Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1477

KeyTransformationHandler should use proper CL to load key's class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.1.0.BETA3, 5.1.0.FINAL
    • 5.1.0.BETA2
    • None
    • None

      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)

              sgrinove Sanne Grinovero (Inactive)
              ajustin@redhat.com Ales Justin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: