0 Replies Latest reply on Nov 29, 2002 5:50 AM by Mark T. Lomongo

    Oracle Connection Problem???

    Mark T. Lomongo Newbie

      I'm trying to run a Bean Managed Entity bean. This works well with sun's J2EE server. I'm using jboss 3.0.4 and jdk 1.4 and I followed the steps provided in the previous messages.
      1. copied classes12.jar to %JBOSS_HOME%\server\default\lib
      2. modified oracle-service.xml to include
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <config-property name="UserName" type="java.lang.String">rnduser</config-property>
      <config-property name="Password" type="java.lang.String">rnduser</config-property>
      3. Copied the jar to deploy folder
      here's my env-entry in the ejb-jar

      The problem is when I try to call ds.getConnection() it gives the OracleDS not bound error, I tried the following but can't make it work
      1.Context ctx = new InitialContext();
      String dsn = (String) ctx.lookup("java:comp/env/PtrUserDB");
      DataSource ds = (DataSource) ctx.lookup(lDataSourceName);

      2. InitialContext ic = new InitialContext();
      DataSource ds = (DataSource) ic.lookup("java:comp/env/PtrUserDB");

      3. InitialContext ic = new InitialContext();
      DataSource ds = (DataSource) ic.lookup("java:/OracleDS");

      Any help is very much appreciated.