I'm trying to use ModeShape JCA adapter on WebSphere 8.
ModeShape uses Infinispan 5.2.6 with config
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"
xmlns="urn:infinispan:config:5.2">
<namedCache name="inf">
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL"
lockingMode="OPTIMISTIC"
useSynchronization="false">
<recovery enabled="true"/>
</transaction>
</namedCache>
</infinispan>
While starting transaction I'm facing ISPN specific exception:
[9/19/13 16:22:04:297 EEST] 0000004d XaTransaction Z org.infinispan.transaction.xa.XaTransactionTable enlist Failed to enlist TransactionXaAdapter to transaction
java.lang.IllegalStateException: Illegal attempt to enlist a 2PC XAResource
at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:1758)
at org.infinispan.transaction.xa.XaTransactionTable.enlist(XaTransactionTable.java:97)
at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:275)
at org.infinispan.interceptors.TxInterceptor.enlistIfNeeded(TxInterceptor.java:236)
at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:230)
at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:226)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:104)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.CacheImpl.get(CacheImpl.java:289)
at org.infinispan.CacheImpl.get(CacheImpl.java:281)
at org.infinispan.schematic.internal.CacheSchematicDb.<init>(CacheSchematicDb.java:69)
at org.infinispan.schematic.Schematic.get(Schematic.java:99)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1025)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:928)
at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:361)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:605)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:155)
at org.modeshape.jca.JcrManagedConnection.openSession(JcrManagedConnection.java:134)
at org.modeshape.jca.JcrManagedConnection.<init>(JcrManagedConnection.java:86)
at org.modeshape.jca.JcrManagedConnectionFactory.createManagedConnection(JcrManagedConnectionFactory.java:189)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2097)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1778)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3258)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2599)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1500)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1012)
at org.modeshape.jca.JcrRepositoryHandle.login(JcrRepositoryHandle.java:131)
at org.modeshape.jca.JcrRepositoryHandle.login(JcrRepositoryHandle.java:123)
at service_pak.DaoImpl.getSession(DaoImpl.java:34)
at service_pak.EJSLocal0SLDaoImpl_42d97f67.getSession(EJSLocal0SLDaoImpl_42d97f67.java)
at service_pak.ServiceImpl.getTransactionManager(ServiceImpl.java:82)
at service_pak.EJSLocal0SLServiceImpl_3d720e08.getTransactionManager(EJSLocal0SLServiceImpl_3d720e08.java)
at integtation.IntegrationWebServiceImpl.getTransactionManagerClassName(IntegrationWebServiceImpl.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:101)
at com.ibm.ws.websvcs.server.dispatcher.EJBBeanDispatcher.invokeTargetOperation(EJBBeanDispatcher.java:192)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:118)
at com.ibm.ws.websvcs.server.dispatcher.EJBBeanDispatcher.invoke(EJBBeanDispatcher.java:80)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:208)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1517)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690)
[9/19/13 16:22:04:300 EEST] 0000004d InvocationCon Z org.infinispan.interceptors.InvocationContextInterceptor handleAll ISPN000136: Execution error
org.infinispan.CacheException: java.lang.IllegalStateException: Illegal attempt to enlist a 2PC XAResource
at org.infinispan.transaction.xa.XaTransactionTable.enlist(XaTransactionTable.java:112)
at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:275)
at org.infinispan.interceptors.TxInterceptor.enlistIfNeeded(TxInterceptor.java:236)
at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:230)
at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:226)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:104)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.CacheImpl.get(CacheImpl.java:289)
at org.infinispan.CacheImpl.get(CacheImpl.java:281)
at org.infinispan.schematic.internal.CacheSchematicDb.<init>(CacheSchematicDb.java:69)
at org.infinispan.schematic.Schematic.get(Schematic.java:99)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1025)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:928)
at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:361)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:605)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:155)
at org.modeshape.jca.JcrManagedConnection.openSession(JcrManagedConnection.java:134)
at org.modeshape.jca.JcrManagedConnection.<init>(JcrManagedConnection.java:86)
at org.modeshape.jca.JcrManagedConnectionFactory.createManagedConnection(JcrManagedConnectionFactory.java:189)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2097)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1778)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3258)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2599)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1500)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1012)
at org.modeshape.jca.JcrRepositoryHandle.login(JcrRepositoryHandle.java:131)
at org.modeshape.jca.JcrRepositoryHandle.login(JcrRepositoryHandle.java:123)
at service_pak.DaoImpl.getSession(DaoImpl.java:34)
at service_pak.EJSLocal0SLDaoImpl_42d97f67.getSession(EJSLocal0SLDaoImpl_42d97f67.java)
at service_pak.ServiceImpl.getTransactionManager(ServiceImpl.java:82)
at service_pak.EJSLocal0SLServiceImpl_3d720e08.getTransactionManager(EJSLocal0SLServiceImpl_3d720e08.java)
at integtation.IntegrationWebServiceImpl.getTransactionManagerClassName(IntegrationWebServiceImpl.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:101)
at com.ibm.ws.websvcs.server.dispatcher.EJBBeanDispatcher.invokeTargetOperation(EJBBeanDispatcher.java:192)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:118)
at com.ibm.ws.websvcs.server.dispatcher.EJBBeanDispatcher.invoke(EJBBeanDispatcher.java:80)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:208)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1517)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690)
Caused by: java.lang.IllegalStateException: Illegal attempt to enlist a 2PC XAResource
at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:1758)
at org.infinispan.transaction.xa.XaTransactionTable.enlist(XaTransactionTable.java:97)
... 72 more
That being said, ISPN 5+ can handle this situation.
Where am I wrong?
Thanks in advance.