3 Replies Latest reply on Jun 6, 2016 6:07 PM by Paul Ferraro

    Infinispan cache between different war files: unmarshalling error "ModuleNotFoundException"

    Oleg Chiruhin Newbie

      I have two servers with two completely different deployments. The only common thing is a single class, that exists on both servers (and both deployed wars)


      So I set up jgroups, infinispan over TCP, etc, and everything works, but unmarshalling fails:


      ERROR [org.infinispan.transaction.TransactionCoordinator] (default task-2) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from server1/ws-container, see cause for remote stack trace

      Caused by: org.infinispan.commons.CacheException: Problems invoking command.

      Caused by: java.io.InvalidClassException: com.my.shared.classes.MyClass; Module load failed

      Caused by: org.jboss.modules.ModuleNotFoundException: deployment.server2.war:main


      (server1, server2 - hostnames of servers

      server1.war, server2.war - different applications deployed on this servers

      ws-container - cache container name, the same on both servers

      com.my.shared.classes.MyClass - shared class, the same on both servers)

      How can we fix this?


      I read about Hibernate regions, but still can't understand how apply this knowledge to bare pojos, not JPA entities.

      Also I read about custom marshallers and unmarshallers and digging this direction now. Maybe we can just replace standard marshaller with Gson...