-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate,jbossPojoCache final method AbstractPersistentColl
PostPosted: Fri Mar 14, 2008 1:57 am 
Newbie

Joined: Fri Feb 15, 2008 4:24 am
Posts: 5
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.

[b][u]But when I call PojoCache.putObject with an Object (which contains collections) loaded by Hibernate, I have the following exception :

I correct this by recompile the class org.hibernate.collection.AbstractPersistentCollection without final method.

Is there any better method to solve this problem? Would there be any implication of changing the methods of the class to non-final? [/u][/b]

I got the solution in jboss-pojo-cache forum from another user having similar problem. So I wanted to be sure if this would affect the functionality.

Kindly note that in our project we do not want to use Jboss cache as hibernate's second level cache for certain reasons. We want hibernate to be thin and need to use the cache in front of it.

The hibernate version used is: hibernate-3.1.3.

[u]EXCEPTION[/u]
----------------------------------------------------
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.