2 Replies Latest reply on Jan 8, 2003 6:19 PM by muruga chinnananchi

    Pointbase XA Datasource - SQLException: The url cannot be nu

    muruga chinnananchi Newbie

      I am trying to create Pointbase XA Datasource on Jboss 3.2. Here is my pointbase service.xml file content. The execption is at the bottom. Can sombody please help with this?

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for xa oracle dbs -->
      <!-- Thanks to igor fedorenko <ifedorenko@thinkdynamics.com> -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- YOU MUST CHANGE THE XidFactoryMBean config to this: -->
      <!--

      true

      -->
      <!-- ==================================================================== -->



      JSBContainerXADataSource

      true

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory

      <!--real attributes-->


      <config-property name="XADataSourceProperties"
      type="java.lang.String">URL="jdbc:pointbase:embedded:collaxa,create=true,pointbase.ini=C:/collaxa/server-default/system/database/scripts/pointbase.ini"</config-property>
      <config-property name="XADataSourceClass"
      type="java.lang.String">com.pointbase.xa.xaDataSource</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName"
      type="java.lang.String">PBPUBLIC</config-property>
      <config-property name="Password"
      type="java.lang.String">PBPUBLIC</config-property>





      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


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

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
      java:/TransactionManager





      The scenario container was unable to establish a connection with the datasource with the connection URL "java:/JSBContainerXADataSource". The exception reported is: "org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: The url cannot be null); - nested throwable: (org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: The url cannot be null))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
      at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.__getConnection(ConnectionFactory.java:240)
      at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.getConnection(ConnectionFactory.java:204)
      at com.collaxa.cube.engine.data.ConnectionFactory.getConnection(ConnectionFactory.java:98)
      at com.collaxa.client.beans.BaseCubeSessionBean.createContext(BaseCubeSessionBean.java:137)
      at com.collaxa.client.beans.BPELContainerManagerBean.refreshScenarios(BPELContainerManagerBean.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:606)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:101)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:303)
      at org.jboss.ejb.Container.invoke(Container.java:680)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:100)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:109)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
      at $Proxy68.refreshScenarios(Unknown Source)
      at com.collaxa.client.BPELContainerHandle.refreshScenarios(BPELContainerHandle.java:105)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:78)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:272)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:550)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1655)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:542)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1605)
      at org.mortbay.http.HttpServer.service(HttpServer.java:862)
      at org.jboss.jetty.Jetty.service(Jetty.java:497)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:752)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:769)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      Caused by: org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: The url cannot be null)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:134)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:259)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:323)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:527)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:285)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:592)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:885)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      ... 50 more
      Caused by: java.sql.SQLException: The url cannot be null
      at java.sql.DriverManager.getConnection(DriverManager.java:489)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at com.pointbase.jdbc.jdbcPooledConnection.(DashOB3242)
      at com.pointbase.xa.xaConnectionResource.(DashOB3242)
      at com.pointbase.xa.xaDataSource.getXAConnection(DashOB3242)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:125)
      ... 58 more

        • 1. Re: Pointbase XA Datasource - SQLException: The url cannot b
          muruga chinnananchi Newbie

          The "URL not found" problem solved by specifying the "DatabaseName" property. Pointbase xa driver expects the "DatabaseName" property instead of "URL" property.

          Here is the correct config file for pointbase xa for JBoss 3.2 Beta3.

          <?xml version="1.0" encoding="UTF-8"?>

          <!-- ===================================================================== -->
          <!-- -->
          <!-- JBoss Server Configuration -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: oracle-xa-ds.xml,v 1.1.2.3 2002/11/22 04:32:24 igorfie Exp $ -->


          <xa-datasource>
          <jndi-name>JSBContainerXADataSource</jndi-name>
          <!--track-connection-by-tx>true</track-connection-by-tx-->
          <!--managedconnectionfactory-class>org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory</managedconnectionfactory-class-->
          <xa-datasource-class>com.pointbase.xa.xaDataSource</xa-datasource-class>
          <xa-datasource-property name="DatabaseName">jdbc:pointbase:embedded:collaxa</xa-datasource-property>
          <xa-datasource-property name="User">PBPUBLIC</xa-datasource-property>
          <xa-datasource-property name="Password">PBPUBLIC</xa-datasource-property>
          </xa-datasource>


          But Now I am facing different problem with this configuration...whenever i initiate the transaction with this pointbase XA DataSource, the transaction takes forever to complete. It simply hangs.. here is the thread dump of the transaction thread.

          "PoolThread-4" prio=5 tid=0x0B4A4410 nid=0x6cc waiting on monitor [c3ad000..c3afdb4]
          at java.lang.Object.wait(Native Method)
          - waiting on <0432AFF8> (a com.pointbase.latch.latch)
          at java.lang.Object.wait(Object.java:426)
          at com.pointbase.latch.latch.getLatch(DashOB3242)
          - locked <0432AFF8> (a com.pointbase.latch.latch)
          at com.pointbase.transxn.transxnXABase.getStartLatch(DashOB3242)
          at com.pointbase.api.apiConnection.start(DashOB3242)
          - locked <0430BE58> (a java.lang.Object)
          at com.pointbase.jdbc.jdbcConnection.start(DashOB3242)
          at com.pointbase.xa.xaConnectionResource.start(DashOB3242)
          at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:107)
          at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1053)
          at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:569)
          at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:415)
          at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:313)
          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:594)
          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:885)
          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
          at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.__getConnection(ConnectionFactory.java:240)
          at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.getConnection(ConnectionFactory.java:204)
          at com.collaxa.cube.engine.data.ConnectionFactory.getConnection(ConnectionFactory.java:98)
          at com.collaxa.client.beans.BaseCubeSessionBean.createContext(BaseCubeSessionBean.java:137)
          at com.collaxa.cube.engine.bean.DispatcherBean.sendBatchMessage(DispatcherBean.java:209)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:606)
          at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:101)
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
          at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:303)
          at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:351)
          at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:81)
          at $Proxy85.sendBatchMessage(Unknown Source)
          at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5024)
          at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1104)
          at com.collaxa.cube.engine.bean.CubeEngineBean.createAndInvoke(CubeEngineBean.java:100)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:606)
          at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:101)
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
          at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:303)
          at org.jboss.ejb.Container.invoke(Container.java:680)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
          at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:100)

          at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
          at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
          at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
          at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:109)
          at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
          at $Proxy77.createAndInvoke(Unknown Source)
          at com.collaxa.client.dispatch.BaseDelegate.__asyncCreateAndInvoke(BaseDelegate.java:70)
          at com.cxdn.samples.HelloWorldDispatchDelegate.createAndInvoke(HelloWorldDispatchDelegate.java:59)
          at org.apache.jsp.ngDoInitiate_jsp._jspService(ngDoInitiate_jsp.java:144)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
          at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:272)
          at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:194)
          at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:121)
          at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:822)
          at org.apache.jsp.displayScenario_jsp._jspService(displayScenario_jsp.java:366)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
          at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:272)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:550)
          at org.mortbay.http.HttpContext.handle(HttpContext.java:1655)
          at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:542)
          at org.mortbay.http.HttpContext.handle(HttpContext.java:1605)
          at org.mortbay.http.HttpServer.service(HttpServer.java:862)
          at org.jboss.jetty.Jetty.service(Jetty.java:497)
          at org.mortbay.http.HttpConnection.service(HttpConnection.java:752)
          at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
          at org.mortbay.http.HttpConnection.handle(HttpConnection.java:769)
          at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
          at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
          at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)



          • 2. Re: Pointbase XA Datasource - SQLException: The url cannot b
            muruga chinnananchi Newbie

            After few minutes the transaction gets TIMED OUT, and the jboss console displays the following message.

            15:29:08,125 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl [Format
            Id=257, GlobalId=muruga//47, BranchQual=] timed out. status=STATUS_ACTIVE
            15:29:08,125 INFO [STDOUT] Exception e encountered