[infinispan-issues] [JBoss JIRA] (ISPN-8568) ClassNotFoundException with Compat mode and custom Pojos

Gustavo Fernandes (JIRA) issues at jboss.org
Mon Nov 27 13:22:00 EST 2017


Gustavo Fernandes created ISPN-8568:
---------------------------------------

             Summary: ClassNotFoundException with Compat mode and custom Pojos
                 Key: ISPN-8568
                 URL: https://issues.jboss.org/browse/ISPN-8568
             Project: Infinispan
          Issue Type: Bug
            Reporter: Gustavo Fernandes


The cache is configured with:

{code:xml}
<cache-container name="local">
     <modules>
          <module name="deployment.myTask.jar"/>
     </modules>
     <local-cache name="compat">
          <compatibility enabled="true"/>
     </local-cache>
</cache-container>
{code}

The {{myTask.jar}} contains Entity.class that is the Pojo to be stored in the cache.

When doing a 

{code:java}
remoteCache.put(1, new Entity());
{code}

The error is 

{noformat}
18:13:42,142 ERROR (main) [TestSuiteProgress] Test failed: LocalServerTestCompatModeIT.shouldRunPriceTask
org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=9 returned server error (status=0x85): java.lang.ClassNotFoundException: org.infinispan.server.test.Entity from [Module "org.infinispan.commons:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /home/gfernandes/github/infinispan/server/integration/testsuite/target/server/node1/modules,/home/gfernandes/github/infinispan/server/integration/testsuite/target/server/node1/modules/system/layers/base))]
{noformat}	


I noticed that in this case, the Marshaller used is {{GenericJBossMarshaller}} who lives in infinispan-commons,  and when asked to de-serialize the pojo in byte[] form, the classloader  used is ModuleClassLoader for Module "org.infinispan.commons:main" that does not have visibility of the deployed jar's classes. 





--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list