[infinispan-issues] [JBoss JIRA] (ISPN-4450) RemoteStore uses wrong classloader with rawValues

Dennis Reed (JIRA) issues at jboss.org
Thu Jun 26 15:02:24 EDT 2014


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

Dennis Reed commented on ISPN-4450:
-----------------------------------

The easy fix: change GenericJBossMarshaller to use Thread.currentThread().getContextClassLoader() instead of this.getClass().getClassLoader().

Questions:
1) Will that break any existing uses, or defined API, for GenericJBossMarshaller?
    I don't think so (you'd never want to use the current GenericJBossMarshaller for any custom user classes because of this issue,
    so it could only affect internal Infinispan usage, but I don't think it's used that way?).
    If it does, we'll need to create a new class.
2) Is the TCCL the correct classloader to use?
    Or should it get the classloader from Infinispan somewhere, where it can be overridden if needed?


> RemoteStore uses wrong classloader with rawValues
> -------------------------------------------------
>
>                 Key: ISPN-4450
>                 URL: https://issues.jboss.org/browse/ISPN-4450
>             Project: Infinispan
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Loaders and Stores
>    Affects Versions: 6.0.2.Final
>            Reporter: Dennis Reed
>            Assignee: Dan Berindei
>
> RemoteStore uses the wrong classloader (Infinispan's classloader instead of the caller's classloader) during deserialization when rawValues=true is set.
> It uses a GenericJBossMarshaller, which is hard-coded to only look in Infinispan's classloader).



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the infinispan-issues mailing list