0 Replies Latest reply on Oct 23, 2002 11:43 AM by Sean Cohan

    Invalid Oracle URL

    Sean Cohan Newbie

      We're trying to connect to an Oracle DB via JDBC, but I haven't gotten it down yet. I have the database (SID = WORKITEM) installed on a Win2K server (bxatest2.) We're running the Jboss 3.0.3 app server on a second PC. The URL connect string we're using in our oracle-xa-service.xml file:

      <config-property name="XADataSourceProperties" type="java.lang.String">
      URL=jdbc:oracle:thin@bxatest2:1521:WORKITEM
      </config-property>

      but getting the following error:

      09:48:05,920 ERROR [STDERR] java.sql.SQLException: Unable to get Connection: javax.resource.ResourceException: Unable to create DB XAConnection: java.sql.SQLException: Invalid Oracle URL specified

      I'm a little confused on where and how tnsnames.ora should be specified. On the server, bxatest2, we have a tnsnames.ora file in c:\oracle\ora81\netword\admin with a connect string as:

      WORKITEM =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS =
      (COMMUNITY = bis.doc.gov)
      (PROTOCOL = TCP)
      (Host = 192.186.217.246)
      (Port = 1521)
      )
      )
      (CONNECT_DATA = (SID = WORKITEM)
      )
      )

      We don't have a tnsnames.ora on the PC running JBoss. Do we need one there and therefore Oracle client installed there? We don't have any entry on the server for this SID in the listener.ora file. Do we need one there?

      Originally I had the following entry on bxatest2:

      workitem.bis.doc.gov =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS =
      (COMMUNITY = bis.doc.gov)
      (PROTOCOL = TCP)
      (Host = 192.186.217.246)
      (Port = 1521)
      )
      )
      (CONNECT_DATA = (SID = WORKITEM)
      )
      )

      In the oracle-xa-service.xml file in this case, should we have:

      <config-property name="XADataSourceProperties" type="java.lang.String">
      URL=jdbc:oracle:thin@bxatest2:1521:workitem.bis.doc.gov
      </config-property>

      Lastly, how and where do we specify the user id and password to connect to the DB as?

      Thanks.