I have deploy a HttpHandler which places an object "Skip" in an Infinispan cache. I have a webapp which looks up the cached "Skip" object but I am getting the following error:
org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: class Skip cannot be cast to class Skip (no.toyota.gatekeeper.model.Skip is in unnamed module of loader 'firstname.lastname@example.org' @2f40315a; no.toyota.gatekeeper.model.Skip is in unnamed module of loader 'deployment.gatekeeper-1.0-SNAPSHOT.war' @7f833b70)
How can I make sure no.toyota.gatekeeper.model.Skip is loaded with the same Classloader or otherwise work around this issue?
Got it. I excluded the classe(s) in question from my webapp and I put a dependency on the HttpHandler module in jboss-deployment-structure.xml. Sweet.