[jboss-user] [JNDI/Naming/Network] - You are trying to use a connection factory that has been sh

rajika do-not-reply at jboss.com
Wed Aug 5 09:07:03 EDT 2009


hi,
I am trying to use xa-datasource configuration for derby with my application deployed on JBoss 5.0.0GA(on Linux with jdk version 1.5). I asked this question from JCA forum and now since this looks like a JNDI problem, I am posting here as well. Sorry for the cross post. 
Once deployed the below xa-configuration  I am getting the exception:  You are trying to use a connection factory that has been shut down (full stack trace is available below.).

Any help to fix the problem will be highly appreciated. Thanks in advance. 


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


The exception when using the above defined data source(I don't get any error while sever start up) as follows. 



  | 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
  | 18:25:27,427 INFO  [STDOUT] 18:25:27,427 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
  | 18:25:27,428 INFO  [STDOUT] 18:25:27,428 WARN  [FaultHandler] ERROR_CODE : 0
  | 18:25:27,428 INFO  [STDOUT] 18:25:27,428 WARN  [FaultHandler] ERROR_MESSAGE : Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
  | 18:25:27,428 INFO  [STDOUT] 18:25:27,428 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)
  | 	... 16 more
  | 
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248121#4248121

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248121



More information about the jboss-user mailing list