2

I am trying to run my application on 2 Wildfly 16 nodes running in Standalone mode using the standalone-full-ha.xml configuration. When the 2nd node starts up, the first attempts to distribute/balance the default web cache to the new node.

When it does this, I see the following error message in the log on the first node, and the 2nd node fails to start:

13:45:48,487 ERROR [org.infinispan.remoting.rpc.RpcManagerImpl] (transport-thread--p18-t8) ISPN000073: Unexpected error while replicating: org.infinispan.commons.marshall.NotSerializableException: org.wildfly.transaction.client.ContextTransactionManager
Caused by: an exception which occurred:
    in field com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.transactionManager
    in object com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired@73962bdb
    in field org.jboss.weld.contexts.SerializableContextualInstanceImpl.instance
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@333ebcb5
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@333ebcb5
    in field java.util.Collections$SynchronizedCollection.c
    in object java.util.Collections$SynchronizedList@333ebcd4
    in field org.jboss.weld.contexts.CreationalContextImpl.dependentInstances
    in object org.jboss.weld.contexts.CreationalContextImpl@4dc7055b
    in field org.jboss.weld.contexts.SerializableContextualInstanceImpl.creationalContext
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@57504e37
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@57504e37

13:45:50,718 ERROR [org.infinispan.statetransfer.OutboundTransferTask] (transport-thread--p18-t8) Failed to send entries to node node2: org.wildfly.transaction.client.ContextTransactionManager: org.infinispan.commons.marshall.NotSerializableException: org.wildfly.transaction.client.ContextTransactionManager
Caused by: an exception which occurred:
    in field com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.transactionManager
    in object com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired@73962bdb
    in field org.jboss.weld.contexts.SerializableContextualInstanceImpl.instance
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@333ebcb5
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@333ebcb5
    in field java.util.Collections$SynchronizedCollection.c
    in object java.util.Collections$SynchronizedList@333ebcd4
    in field org.jboss.weld.contexts.CreationalContextImpl.dependentInstances
    in object org.jboss.weld.contexts.CreationalContextImpl@4dc7055b
    in field org.jboss.weld.contexts.SerializableContextualInstanceImpl.creationalContext
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@57504e37
    in object org.jboss.weld.contexts.SerializableContextualInstanceImpl@57504e37

Some other things to note:

  • It fails when starting up one of my WARs that is distributed inside an EAR, but not the other 2 WARs that are also deployed in the EAR
  • My web.xml is marked as <distributable/> for all 3 WARs
  • My other caches seem to replicate just fine

I can't seem to figure out where the ContextTransactionManager is being used, or why it my be serialized to a session cache. I'm assuming it might be in my code somewhere, but I can't figure out where to even start looking. Any help would be appreciated!

Update (05/28/2019): Here are a couple screenshots from the management console showing 2 sessions that get created at startup (we use JSP in our web app, and we have a startup service that runs to pre-compile all of the JSP files):

Session 1 Session 2

  • What is the Infinispan version? Could you please test with 9.4.13.Final ? – Diego May 23 '19 at 16:52
  • did you confirmed the session will not store any unwantd attribute? the cause "in field com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.transactionManager" sounds like you try to replicate some internal stuff. In case of non HA profiles it will be local, so no need for serializaton – wfink May 24 '19 at 20:22
  • @Diego It's the version built into Wildfly 16, which appears to be 9.4.8 – Jonathan Putney May 28 '19 at 15:29
  • @wfink we're not actively trying to replicate anything other than user sessions. I've updated the description with a couple screenshots showing some default sessions that get created when the application starts up. Looking at the "WELD_S#1" attribute, my guess would be that something is causing an issue there, but the LoggedInUser class is just a SessionScoped managed bean, and it is Serializable, and does not extend any other class. – Jonathan Putney May 28 '19 at 18:28

1 Answers1

0

Update: This ended up being a really simple and somewhat stupid problem in the first place. We had marked a method in the LoggedInUser class with the @javax.transaction.Transactional annotation, which was not necessary in the first place, but was causing the serialization issue.

Just wanted to post an update in case anyone else ran across something similar.