1 Reply Latest reply on Jun 8, 2004 8:32 AM by darranl

    problem configuring a connector to Oracle

    maniarkm

      Hi,

      I am having a problem setting up a resource adaptor for Oracle on JBoss 3.2.3

      I tried following the recommendations however I still cannot connect using the connector.

      Firstly, I created a .rar and put a ra.xml and an oracle-ds.xml in the META-INF directory. The ra.xml just had:




      as I did not know what to enter here as I can find no clear definition of what goes there.

      I copied the oracle-ds.xml from the examples directory and changed the file to represent the connection attributes to our Oracle DB.

      When I start JBoss I get the following startup info

      11:56:26,765 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss-3.2.3/server/default/deploy/upstream.rar/
      11:56:26,765 INFO [RARDeployer] nested deployment: file:/D:/jboss-3.2.3/server/default/deploy/upstream.rar/META-INF/oracle-ds.xml
      11:56:26,843 INFO [RARDeployment] Started jboss.jca:service=ManagedConnectionFactory,name=upstreamdb
      11:56:26,843 INFO [JBossManagedConnectionPool] Started jboss.jca:service=ManagedConnectionPool,name=upstreamdb
      11:56:26,843 INFO [upstreamdb] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=upstreamdb to JNDI name 'java:/upstreamdb'
      11:56:26,843 INFO [TxConnectionManager] Started jboss.jca:service=LocalTxCM,name=upstreamdb
      11:56:26,859 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.3/server/default/deploy/upstream.rar/

      This seems to suggest that is has been set up. Am I wrong?

      However, when I try to connect to it using the following code:

      private void initializeDataSource()
      {
      try
      {
      jndiContext = new InitialContext();
      ds = (DataSource) jndiContext.lookup(datasourceName);

      }
      catch (NamingException ne) {
      _log.logError("DBPool.init()", ne);
      }
      }

      I get a:

      2004/06/07, 15:33:21,296 : ERROR : DBPool.init() : jdbc not bound
      javax.naming.NameNotFoundException: jdbc not bound

      Can someone tell me what I am doing wrong?

      Cheers,

      Mark