[infinispan-issues] [JBoss JIRA] (ISPN-5444) Improve handling of custom classes with deployed filter/converters in server

Galder Zamarreño (JIRA) issues at jboss.org
Thu May 7 11:53:46 EDT 2015


    [ https://issues.jboss.org/browse/ISPN-5444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066290#comment-13066290 ] 

Galder Zamarreño commented on ISPN-5444:
----------------------------------------

In theory, if ValueAddedEvent is included in the filter/converter jar, it should work but user reported that it does not.

Had a quick chat with [~pferraro] and he said that if we add the following, Infinispan should be able to find the class and unmarshall it succesfully:

{code}
GlobalConfigurationBuilder.serialization().classResolver(ModularClassResolver.getInstance(moduleLoader));
{code}

> Improve handling of custom classes with deployed filter/converters in server
> ----------------------------------------------------------------------------
>
>                 Key: ISPN-5444
>                 URL: https://issues.jboss.org/browse/ISPN-5444
>             Project: Infinispan
>          Issue Type: Enhancement
>            Reporter: Galder Zamarreño
>
> If a user deploys a filter/converter into server, and the cache contains custom classes, the default behaviour of unmarshalling custom classes for the filter/converter will generate CNFEs, e.g.
> {code}
> Caused by: java.lang.ClassNotFoundException: ValueAddedEvent from [Module
> "org.infinispan.commons:main" from local module loader @4b7504fb
> (finder: local module finder @6f9a2170 (roots:
> /opt/infinispan/modules,/opt/infinispan/modules/system/layers/base))]
> [..]
>    at
> org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
> [infinispan-commons-7.2.0-SNAPSHOT.jar:7.2.0-SNAPSHOT]
>    at
> org.infinispan.server.hotrod.ClientListenerRegistry$UnmarshallConverter.convert(ClientListenerRegistry.scala:383)
> [infinispan-server-hotrod-7.2.0-SNAPSHOT.jar:7.2.0-SNAPSHOT]
> {code}
> Even if the classes are deployed along with the filter/converter, these won't be found. Currently, the only way to workaround it is to add those classes into a module and get the infinispan-commons module to depend on it to locate them.
> A better solution is needed here...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the infinispan-issues mailing list