[
https://issues.jboss.org/browse/ISPN-1477?page=com.atlassian.jira.plugin....
]
Sanne Grinovero commented on ISPN-1477:
---------------------------------------
It seems Query is doing the correct thing, but there is a bug in Infinispan core which has
getAdvancedCache() return a different cache instance which ignores the set ClassLoader.
KeyTransformationHandler should use proper CL to load key's
class
-----------------------------------------------------------------
Key: ISPN-1477
URL:
https://issues.jboss.org/browse/ISPN-1477
Project: Infinispan
Issue Type: Bug
Reporter: Ales Justin
Assignee: Sanne Grinovero
Wrong classloader is used when looking up key class -- it uses cache's classloader
(in JBossAS7 case this is org.jboss.as.clustering' module CL).
e.g. user could have custom key and its Transformer as part of his deployment, but only
deployment's CL sees this two classes
18:04:02,866 ERROR [org.infinispan.query.backend.KeyTransformationHandler] (RMI TCP
Connection(3)-127.0.0.1) ISPN014001: Could not locate key class
com.google.appengine.api.datastore.Key: java.lang.ClassNotFoundException:
com.google.appengine.api.datastore.Key
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) [:1.6.0_26]
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [:1.6.0_26]
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [:1.6.0_26]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [:1.6.0_26]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_26]
at java.lang.Class.forName0(Native Method) [:1.6.0_26]
at java.lang.Class.forName(Class.java:247) [:1.6.0_26]
at org.infinispan.util.Util.loadClassStrict(Util.java:126)
at
org.infinispan.query.backend.KeyTransformationHandler.stringToKey(KeyTransformationHandler.java:90)
at org.infinispan.query.impl.EntityLoader.load(EntityLoader.java:47)
at org.infinispan.query.impl.EntityLoader.load(EntityLoader.java:55)
at org.infinispan.query.impl.CacheQueryImpl.list(CacheQueryImpl.java:147)
at
org.jboss.capedwarf.datastore.query.PreparedQueryImpl.asQueryResultList(PreparedQueryImpl.java:30)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira