1 Reply Latest reply on Jun 27, 2003 5:40 AM by Rubens Zischler

    Cannot get Datasource connection with BC4J

    Rubens Zischler Newbie

      After deploying the Oracle BC4J using a Datasource as DB connection I run a client that access the beans.
      When the application module tryes to connect the DB I become the following runtime error:
      2003-06-27 10:40:12,933 DEBUG [org.jboss.management.j2ee.factory.EARModuleFactory] Created J2EEApplication: jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=jbossProjectEJB.ear
      2003-06-27 10:40:12,933 INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/C:/jboss/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossProjectEJB.ear
      2003-06-27 10:40:12,933 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: jbossProjectEJB.ear
      2003-06-27 10:40:12,933 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossProjectEJB.ear
      2003-06-27 10:40:12,933 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/jboss/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossProjectEJB.ear -> file:/C:/jboss/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/jbossProjectEJB.ear
      2003-06-27 10:40:39,311 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: dhfxtpqn-f
      2003-06-27 10:40:39,311 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void oracle.jbo.server.remote.ejb.EJBApplicationModuleImpl.ejbCreate(oracle.jbo.common.remote.SessionInfo) throws javax.ejb.CreateException,oracle.jbo.common.remote.ejb.RemoteJboException
      2003-06-27 10:40:45,730 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2003-06-27 10:40:46,291 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2003-06-27 10:40:52,049 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=scott, password=tiger}
      2003-06-27 10:40:53,421 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Successfully closed a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@88b
      java.lang.Exception: Stack Trace
      void org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll(java.util.Map)
      CachedConnectionManager.java:376
      void org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(java.util.Set)
      CachedConnectionManager.java:199
      java.lang.Object org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(org.jboss.invocation.Invocation)
      CachedConnectionInterceptor.java:190
      java.lang.Object org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(org.jboss.invocation.Invocation, boolean)
      AbstractTxInterceptor.java:84
      java.lang.Object org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(org.jboss.invocation.Invocation)
      AbstractTxInterceptorBMT.java:144
      java.lang.Object org.jboss.ejb.plugins.TxInterceptorBMT.invoke(org.jboss.invocation.Invocation)
      TxInterceptorBMT.java:62
      java.lang.Object org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(org.jboss.invocation.Invocation)
      StatefulSessionInstanceInterceptor.java:271
      java.lang.Object org.jboss.ejb.plugins.LogInterceptor.invoke(org.jboss.invocation.Invocation)
      LogInterceptor.java:191
      java.lang.Object org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(org.jboss.invocation.Invocation)
      ProxyFactoryFinderInterceptor.java:122
      java.lang.Object org.jboss.ejb.StatefulSessionContainer.internalInvoke(org.jboss.invocation.Invocation)
      StatefulSessionContainer.java:410
      java.lang.Object org.jboss.ejb.Container.invoke(org.jboss.invocation.Invocation)
      Container.java:674
      java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
      native code
      java.lang.Object org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
      ReflectedMBeanDispatcher.java:284
      java.lang.Object org.jboss.mx.server.MBeanServerImpl.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])
      MBeanServerImpl.java:549
      java.lang.Object org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(org.jboss.invocation.Invocation)
      JRMPInvoker.java:359
      java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
      native code
      void sun.rmi.server.UnicastServerRef.dispatch(java.rmi.Remote, java.rmi.server.RemoteCall)
      UnicastServerRef.java:241
      java.lang.Object sun.rmi.transport.Transport$1.run()
      Transport.java:152
      java.lang.Object java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
      native code
      boolean sun.rmi.transport.Transport.serviceCall(java.rmi.server.RemoteCall)
      Transport.java:148
      void sun.rmi.transport.tcp.TCPTransport.handleMessages(sun.rmi.transport.Connection, boolean)
      TCPTransport.java:465
      void sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
      TCPTransport.java:706
      void java.lang.Thread.run()
      Thread.java:484

      With Bea (WLS) and OC4J it is not necessary to make a separate DB connection with the "am.getTransaction().connectToDataSource( env, "java:/ScottTigerDS", false );" statement.

        • 1. server.log
          Rubens Zischler Newbie

          At the boot time from the server it comes the following related to the Datasource:

          2003-06-27 11:23:02,277 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/oracle-ds.xml
          2003-06-27 11:23:02,327 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.XSLSubDeployer@8b
          2003-06-27 11:23:02,387 INFO [org.jboss.deployment.XSLSubDeployer] transformed into doc: [#document: null]
          2003-06-27 11:23:02,387 DEBUG [org.jboss.deployment.XSLSubDeployer] transformed into doc: <?xml version="1.0" encoding="UTF-8"?>

          <mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" display-name="ConnectionManager for DataSource ScottTigerDS" name="jboss.jca:service=LocalTxCM,name=ScottTigerDS">true
          true
          <depends optional-attribute-name="ManagedConnectionPool"><mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" display-name="Connection Pool for DataSource ScottTigerDS" name="jboss.jca:service=ManagedConnectionPool,name=ScottTigerDS"><depends optional-attribute-name="ManagedConnectionFactoryName"><mbean code="org.jboss.resource.connectionmanager.RARDeployment" display-name="ManagedConnectionFactory for DataSource ScottTigerDS" name="jboss.jca:service=ManagedConnectionFactory,name=ScottTigerDS"><depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
          <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@192.168.61.6:1521:tran8a</config-property>
          <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
          <config-property name="UserName" type="java.lang.String">scott</config-property>
          <config-property name="Password" type="java.lang.String">tiger</config-property>
          <config-property name="ExceptionSorterClassName" type="java.lang.String">org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</config-property>




          0
          20
          5000
          15
          ByNothing


          ScottTigerDS
          <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
          <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager




          Does it help?