How to use dataBase other than cloudscape in J2ee server - urgen


EJB programming & troubleshooting: How to use dataBase other than cloudscape in J2ee server - urgen

  1. hi to all,
        i am new to the world of ejb. I have coded my CMP Entity Beans. The problem which i am facing is how to use my own Database , as with j2ee server(j2ee 1.3) has it's own Cloudscape DB. The option i have either i should create my tables in the cloudscape DB(which i don't want to use).

    So can any body help me to share his/her knowledge regarding this problem . I will be very thanxful.

    It's urgency.!

  2. Hi ,
    Pls have the entry in the as

    1521 is used by oracle so u have suffix with ip
    oracle instance =oracleDb

    In the xml of cmp u have to mention the clientPool....

    I hope it could help u ..If u have nay more clarification u can reply....
  3. Thanx..
    thanx for ur usefull information can help me in my work

  4. hi mic,
    thanxs for ur valueable information .
    But the thing what i want to know is that
    first of all i am using J2SDKEE 1.3 and
    as u know i have coded my CMP's , but the problem is that
    i am unable to connect the database
    i exaclty code what i have done

    ////////////////// for getting connection i have done

    import javax.sql.DataSource
    private Connection getConnection()
        throws SQLException
        InitialContext initCtx = null;
        try {
           initCtx = new InitialContext();
    DataSource ds= (javax.sql.DataSource) initCtx.lookup("java:comp/env/jdbc/TimeReportDB");
           return ds.getConnection();
        catch(NamingException ne)
           log("Failed to lookup JDBC Datasource. Please double check that");
           throw new EJBException(ne);
           try {
             if(initCtx != null) initCtx.close();
           catch(NamingException ne)
                   log("Error closing context: " + ne);
                   throw new EJBException(ne);

     throught deplooyment tool setting
    i have set the following

    "jdbc:odbc:TimeReportDB" is the DSN name &
    "jdbc/TimeReportDB" is the JNDI name

    the error which i am getting is
    SQLException -- Not a suitable Driver

    it will be quite helpful for me , is u give solution/steps to configure my database in j2sdkee1.3


  5. If u look carefully - u are attempting to use jdbc:odbc bridge instead of just pure type 3 or 4 JDBC drivers for Oracle -thats why it is complaining "Not a suitable driver "

    How ever if u are connecting using jdbc-odbc bridge please create a DSN on ur windows2000/NT to the Oracle db that u are trying to connet to.

    There is a basic tutorial on jdbc here

    Here is a link on sun site describing the types of database and the use.

  6. hi mic
    i had already created the DSN !
  7. I think you are using J2EE RI from SUN. In that case, you will need to edit configuration file
     {j2ee1.3HOME}/config/ I am assuming that you are using Oracle Database. You need to add the following entries :

    I hope this helps.



  8. hi ABHIJEET ,
    thanxs for u valueable suggestion ,
    intially i was trying out with MS Access .
    i don't think J2sdkee1.3 has a combation with Access database , know i am trying out with oracle
    thanxs once again
  9. hi abhi ,
    i am getting a problem (Exception)when my bean trys to connect with database

    SQLException: java.sql.SQLException: Io exception: Connection refused(DESCRIPTI

    and i am using following in resource properties file