4 Replies Latest reply on Sep 17, 2013 10:00 AM by Horia Chiorean

    ClassCastException on JCA session start

    Andrey Samuleev Newbie

      I'm trying to use Modeshape's JCA resource adapter on WebSphere 8 AS.

      I have deployed modeshape-jca-3.5.0.Final.rar, and configured 'repositoryURL' property to use configuration file:

       

      {

          "name": "JCA Test Repository",

          "transactionMode": "auto",

          "jndiName": "",

          "workspaces": {

              "predefined": ["test_workspace"],

              "default": "default",

              "allowCreation": true

          },

          "security": {

              "anonymous": {

                  "roles": ["readonly", "readwrite", "admin"],

                  "useOnFailedLogin": false

              }

          },

          "storage": {

              "cacheName": "inf",

              "cacheConfiguration": "infinispan-application.xml"

          },

          "query": {

              "enabled": true,

              "enableFullTextSearch": true,

              "indexStorage": {

                  "type": "ram"

              },

              "indexing": {

                  "mode": "sync"

              }

          }

      }

       

       

      And following Infinispan configuration:

      <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="true"

                      />

          </namedCache>

      </infinispan>

       

       

      Now I can get Repository instance by JNDI name 'jcr/datastore'. This instance have properties as in configuration file, such as name = 'JCA Test Repository'.

      But when I'm trying to start session by invoking 'Repository.login()' it throws ClassCastException:

       

       

      [9/16/13 13:34:35:584 EEST] 0000002a XATransaction E   J2CA0027E: An exception occurred while invoking start on an XA Resource Adapter from DataSource jcr/datastore, within transaction ID {XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54),

      data(0000014126560cbf0000000119416ff0612d46159e8a98e8fff17fe30e23c197980bdf900000014126560cbf0000000119416ff0612d46159e8a98e8fff17fe30e23c197980bdf90000000010000000000000000000000000001)} : java.lang.ClassCastException: org.infinispan.transaction.TransactionTable incompatible with org.infinispan.transaction.xa.XaTransactionTable

        at org.infinispan.transaction.xa.TransactionXaAdapter.<init>(TransactionXaAdapter.java:96)

        at org.infinispan.CacheImpl.getXAResource(CacheImpl.java:766)

        at org.modeshape.jcr.cache.document.LocalDocumentStore.xaResource(LocalDocumentStore.java:176)

        at org.modeshape.jcr.JcrXaSession.delegate(JcrXaSession.java:53)

        at org.modeshape.jcr.JcrXaSession.start(JcrXaSession.java:59)

        at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1475)

        at com.ibm.ws.Transaction.JTA.JTAResourceBase.start(JTAResourceBase.java:153)

        at com.ibm.tx.jta.impl.RegisteredResources.startRes(RegisteredResources.java:1001)

        at com.ibm.ws.tx.jta.RegisteredResources.enlistResource(RegisteredResources.java:1113)

        at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:2185)

        at com.ibm.tx.jta.impl.EmbeddableTranManagerSet.enlist(EmbeddableTranManagerSet.java:150)

        at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:727)

        at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:2064)

        at com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java:1661)

        at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1036)

        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/16/13 13:34:35:594 EEST] 0000002a RegisteredRes E   WTRN0078E: An attempt by the transaction manager to call start on a transactional resource has resulted in an error. The error code was XAER_RMFAIL. The exception stack trace follows: javax.transaction.xa.XAException

        at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1512)

        at com.ibm.ws.Transaction.JTA.JTAResourceBase.start(JTAResourceBase.java:153)

        at com.ibm.tx.jta.impl.RegisteredResources.startRes(RegisteredResources.java:1001)

        at com.ibm.ws.tx.jta.RegisteredResources.enlistResource(RegisteredResources.java:1113)

        at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:2185)

        at com.ibm.tx.jta.impl.EmbeddableTranManagerSet.enlist(EmbeddableTranManagerSet.java:150)

        at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:727)

        at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:2064)

        at com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java:1661)

        at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1036)

        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.ClassCastException: org.infinispan.transaction.TransactionTable incompatible with org.infinispan.transaction.xa.XaTransactionTable

        at org.infinispan.transaction.xa.TransactionXaAdapter.<init>(TransactionXaAdapter.java:96)

        at org.infinispan.CacheImpl.getXAResource(CacheImpl.java:766)

        at org.modeshape.jcr.cache.document.LocalDocumentStore.xaResource(LocalDocumentStore.java:176)

        at org.modeshape.jcr.JcrXaSession.delegate(JcrXaSession.java:53)

        at org.modeshape.jcr.JcrXaSession.start(JcrXaSession.java:59)

        at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1475)

        ... 52 more

       

       

      [9/16/13 13:34:35:602 EEST] 0000002a XATransaction E   J2CA0030E: Method enlist caught javax.transaction.SystemException: XAResource start association error:XAER_RMFAIL

        at com.ibm.tx.jta.impl.RegisteredResources.startRes(RegisteredResources.java:1052)

        at com.ibm.ws.tx.jta.RegisteredResources.enlistResource(RegisteredResources.java:1113)

        at com.ibm.ws.tx.jta.TransactionImpl.enlistResource(TransactionImpl.java:2185)

        at com.ibm.tx.jta.impl.EmbeddableTranManagerSet.enlist(EmbeddableTranManagerSet.java:150)

        at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:727)

        at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:2064)

        at com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java:1661)

        at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1036)

        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: javax.transaction.xa.XAException

        at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1512)

        at com.ibm.ws.Transaction.JTA.JTAResourceBase.start(JTAResourceBase.java:153)

        at com.ibm.tx.jta.impl.RegisteredResources.startRes(RegisteredResources.java:1001)

        ... 50 more

      Caused by: java.lang.ClassCastException: org.infinispan.transaction.TransactionTable incompatible with org.infinispan.transaction.xa.XaTransactionTable

        at org.infinispan.transaction.xa.TransactionXaAdapter.<init>(TransactionXaAdapter.java:96)

        at org.infinispan.CacheImpl.getXAResource(CacheImpl.java:766)

        at org.modeshape.jcr.cache.document.LocalDocumentStore.xaResource(LocalDocumentStore.java:176)

        at org.modeshape.jcr.JcrXaSession.delegate(JcrXaSession.java:53)

        at org.modeshape.jcr.JcrXaSession.start(JcrXaSession.java:59)

        at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1475)

        ... 52 more

      while trying to enlist resources from DataSource jcr/datastore with the Transaction Manager for the current transaction, and threw a ResourceException.


      Where am I wrong?

      Thanks in advance.

        • 1. Re: ClassCastException on JCA session start
          Randall Hauch Master

          Which version of ModeShape?

           

          First, shouldn't use be using a WebSphere-specific transaction manager lookup? See Container managed transactions on WebSphere 8.0

           

          Second, have you tried not using synchronization and enabling recovery? See [#WFLY-1719] ClassCastException on clustered deployment - JBoss Issue Tracker

           

          If none of these work, you might try asking the Infinispan folks directly; they may be able to spot a problem in your Infinispan configuration.

          1 of 1 people found this helpful
          • 2. Re: ClassCastException on JCA session start
            Andrey Samuleev Newbie

            Thank you for response!

            ModeShape version is 3.5

             

            While comments in default infinispan transaction manager lookup says that it can handle only version 5.1, 5.0 and 4 of WebSphere,

            I found that solution for 5.1 version also works for 8.  It successfully returns 'com.ibm.ws.tx.jta.TranManagerSet' instance. When I start engine and get repository manually by invoking 'engine.deploy(config)' , container managed transactions works fine (I have tested rollback case).

             

            Disabling synchronization and enabling recovery was very helpful. This makes ClassCastException disappear.

            But now another exception thrown:

             

            [9/16/13 19:07:08:622 EEST] 0000002a GlobalCompone Z org.infinispan.factories.GlobalComponentRegistry start ISPN000128: Infinispan version: Infinispan 'Delirium' 5.2.6.Final

            [9/16/13 19:07:09:542 EEST] 0000002a CacheJmxRegis Z org.infinispan.jmx.CacheJmxRegistration start ISPN000031: MBeans were successfully registered to the platform MBean server.

            [9/16/13 19:07:09:577 EEST] 0000002a 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/16/13 19:07:09:583 EEST] 0000002a 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

            • 3. Re: ClassCastException on JCA session start
              Randall Hauch Master

              Sorry, but the only thing I can suggest is to ask in the Infinispan forums. It's obvious to me that this is a problem within Infinispan cache and how it is working on WebSphere, so hopefully someone in the Infinispan forums will have some experience and can suggest a workaround or a way to fix it. If you do ask a question in their forum, please post the link here so we (and others) can follow along.