Hi, 

I am using PojoCache to store Pojo Objects created by Hibernate.
I want to use the replication mode with this cache, so I pre-compile with aopc 
(ant task) my classes.

But when I call PojoCache.putObject with an Object (which contains collections) 
loaded by Hibernate, I have an exception :

Caused by: org.jboss.cache.CacheException: failure creating proxy
        at 
org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:124)
        at 
org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:213)
        at 
org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:468)
        at 
org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:206)
        at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
        at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:462)
        at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:423)
        at 
com.gltrade.manager.cache.PojoCacheManagerImpl.put(PojoCacheManagerImpl.java:75)
        ... 12 more
Caused by: java.lang.RuntimeException: javassist.CannotCompileException: by 
java.lang.VerifyError: class AOPClassProxy$0 overrides final method .Û8Ý*h'+
        at 
org.jboss.cache.aop.collection.CollectionInterceptorUtil.getMethodMap(CollectionInterceptorUtil.java:74)
        at 
org.jboss.cache.aop.collection.CachedMapInterceptor.(CachedMapInterceptor.java:33)
        at 
org.jboss.cache.aop.collection.CollectionInterceptorUtil.createMapProxy(CollectionInterceptorUtil.java:50)
        at 
org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:122)
        ... 19 more
Caused by: javassist.CannotCompileException: by java.lang.VerifyError: class 
AOPClassProxy$0 overrides final method .Û8Ý*h'+
        at javassist.ClassPool.toClass(ClassPool.java:906)
        at javassist.ClassPool.toClass(ClassPool.java:846)
        at org.jboss.aop.AOPClassPool.toClass(AOPClassPool.java:181)
        at javassist.ClassPool.toClass(ClassPool.java:804)
        at javassist.CtClass.toClass(CtClass.java:1037)
        at 
org.jboss.aop.proxy.ClassProxyFactory.generateProxy(ClassProxyFactory.java:290)
        at 
org.jboss.aop.proxy.ClassProxyFactory.getProxyClass(ClassProxyFactory.java:67)
        at 
org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:79)
        at 
org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:52)
        at 
org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:47)
        at 
org.jboss.cache.aop.collection.CollectionInterceptorUtil.getMethodMap(CollectionInterceptorUtil.java:72)
        ... 22 more
Caused by: java.lang.VerifyError: class AOPClassProxy$0 overrides final method 
.Û8Ý*h'+
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javassist.ClassPool.toClass(ClassPool.java:898)
        ... 32 more

I have done many tests, I have reproduced the problem without Hibernate.
In fact, the problem is the Hibernate implementation of Collections e.g: 
org.hibernate.collection.PersistentSet.

When I create an Object which contains other objets within PersistentSet, I 
cannot put objets into PojoCache and I have the same exception.

So, Could PojoCache work with Hibernate Objects and its Collection 
implementations ???

Thanks for Help.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971509#3971509

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971509

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to