not able to connect to Oracle

Discussions

EJB programming & troubleshooting: not able to connect to Oracle

  1. not able to connect to Oracle (2 messages)

    Hi,

    I recently downloaded j2ee and created one entity bean.

    i am not able to connect to Oracle.

    i followed the following steps given in the document:

    1. Add the JDBC driver.
    Syntax:
    j2eeadmin -addJdbcDriver <class name>
    Example:
    j2eeadmin -addJdbcDriver oracle.jdbc.driver.OracleDriver

    2. Add the DataSource:.
    Syntax:
    j2eeadmin -addJdbcDatasource <jndi name> <url>
    Example:
    j2eeadmin -addJdbcDatasource \
    jdbc/Oracle jdbc:oracle:thin@rtc:1521:acct
    3. Update the J2EE_CLASSPATH. (See the J2EE_CLASSPATH section.)
    4. Restart the J2EE server.

    Please let me know if anybody has connected Oracle.

    thanks
  2. you are missing a colone in the URL after the word thin.

    it should be jdbc:oracle:thin:@youroracleserver:1521:dbname
  3. i had put the colon after "thin".
    even then it does not connect.
    my other application(non ejb) r able to connect.
    the problem is with this entity bean only.
    the same entity bean is connecting to
    cloudspac database shiped with j2ee.

    can u please tell me what am i missing?

    thanks.