2 Replies Latest reply on Sep 11, 2009 8:30 AM by Vicky Kak

    xa-datasource configuraton problem

    Rajika Kumarasiri Newbie

      hi,
      I am trying to use derby xa-datasource (two data sources) for transaction purposes. My *-xa-ds.xml looks like follows.

      <datasources>
       <xa-datasource>
       <jndi-name>XADerbyDS</jndi-name>
      
       <isSameRM-override-value>false</isSameRM-override-value>
       <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
       <xa-datasource-property name="URL">jdbc:derby://localhost:1527/esbdb;create=false</xa-datasource-property>
       <xa-datasource-property name="User">esb</xa-datasource-property>
       <xa-datasource-property name="Password">esb</xa-datasource-property>
      
       <metadata>
       <type-mapping>Derby</type-mapping>
       </metadata>
       </xa-datasource>
      
       <xa-datasource>
       <jndi-name>XADerbyDS1</jndi-name>
       <isSameRM-override-value>false</isSameRM-override-value>
       <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
       <xa-datasource-property name="URL">jdbc:derby://localhost:1527/esbdb1;create=false</xa-datasource-property>
       <xa-datasource-property name="User">esb</xa-datasource-property>
       <xa-datasource-property name="Password">esb</xa-datasource-property>
       <metadata>
       <type-mapping>Derby</type-mapping>
       </metadata>
       </xa-datasource>
      
      </datasources>
      


      When I deploy it and try to use the data source I am having the following exception. I feel like I am missing something from the above configuration, but I am not sure. Any help to fix the problem is highly appreciated. Thanks in advance.

      14:43:16,924 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
       at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
       at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
       at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
       at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
       at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
       at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
       ... 25 more
      Caused by: java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)
       at java.lang.Class.getMethod(Class.java:1581)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
       ... 26 more
      14:43:16,927 INFO [STDOUT] 14:43:16,927 ERROR [DBReportMediator] Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
       at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
       at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
       at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
       at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
       at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
       at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
       ... 16 more
      Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
       ... 25 more
      Caused by: java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)
       at java.lang.Class.getMethod(Class.java:1581)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
       ... 26 more
      14:43:16,928 INFO [STDOUT] 14:43:16,928 ERROR [SERVICE_LOGGER] Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
       at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
       at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
       at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
       at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
       at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
       at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
       ... 16 more
      Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
       ... 25 more
      Caused by: java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)
       at java.lang.Class.getMethod(Class.java:1581)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
       ... 26 more
      14:43:16,929 INFO [STDOUT] 14:43:16,929 WARN [FaultHandler] ERROR_CODE : 0
      14:43:16,929 INFO [STDOUT] 14:43:16,929 WARN [FaultHandler] ERROR_MESSAGE : Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
      14:43:16,929 INFO [STDOUT] 14:43:16,929 WARN [FaultHandler] ERROR_DETAIL : org.apache.synapse.SynapseException: Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
       at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:275)
       at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:61)
       at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
       at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
       at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
       at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
       at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
       at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
       at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
       at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
       at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
       ... 14 more
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
       ... 16 more
      Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String))
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
       ... 25 more
      Caused by: java.lang.NoSuchMethodException: org.apache.derby.jdbc.EmbeddedXADataSource.setURL(java.lang.String)
       at java.lang.Class.getMethod(Class.java:1581)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
       ... 26 more
      
      


        • 1. Re: xa-datasource configuraton problem
          Rajika Kumarasiri Newbie

          hi,
          I removed one data source definition to isolate the problem. Now my *-xa-ds.xml looks like follows.

          <datasources>
           <xa-datasource>
           <jndi-name>XADerbyDS</jndi-name>
          
           <!-- uncomment to enable interleaving <interleaving/> -->
          
           <isSameRM-override-value>false</isSameRM-override-value>
           <user-name>esb</user-name>
           <password>esb</password>
          
           <!-- path to the database. (${jboss.server.data.dir}${/}derby${/}default didn't work on win) -->
           <xa-datasource-property name="DatabaseName">derby/esbdb</xa-datasource-property>
           <xa-datasource-property name="User">esb</xa-datasource-property>
           <xa-datasource-property name="Port">1527</xa-datasource-property>
           <xa-datasource-property name="Password">esb</xa-datasource-property>
           <xa-datasource-property name="CreateDatabase">create</xa-datasource-property>
           <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
          
           <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
           <metadata>
           <type-mapping>Derby</type-mapping>
           </metadata>
           </xa-datasource>
           <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
          
          
          
          </datasources>
          
          



          Now I am having the following exception

          org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
           at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
           at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
           at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
           at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
           at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
           at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
           at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
           ... 16 more
          17:10:00,067 INFO [STDOUT] 17:10:00,067 ERROR [SERVICE_LOGGER] Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
          org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
           at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
           at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
           at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
           at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
           at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
           at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
           at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
           ... 16 more
          17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_CODE : 0
          17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_MESSAGE : Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
          17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_DETAIL : org.apache.synapse.SynapseException: Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
           at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:275)
           at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:61)
           at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
           at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
           at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
           at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
           at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
           at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
           at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
           at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
           at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
           ... 14 more
          Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
          


          • 2. Re: xa-datasource configuraton problem
            Vicky Kak Master

             

            <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
             <xa-datasource-property name="URL">jdbc:derby://localhost:1527/esbdb;create=false</xa-datasource-property>

            The above configuration will work only if there is setURL method present in org.apache.derby.jdbc.EmbeddedXADataSource which is not there, check this
            http://db.apache.org/derby/javadoc/publishedapi/jdbc3/org/apache/derby/jdbc/EmbeddedXADataSource.html

            I don't see a way to confire a xa-datasouce after looking at this link, however you can configure local-tx-datasouce as explained here
            http://www.jboss.org/community/wiki/SetUpADerbyDatasource