[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=all ]
Bong Munoz updated HHH-1293:
----------------------------
Attachment: HibernateLazyInitializerTest.java
TestProcess.xml
hibernate.properties
I am able to reproduce this problem consistently using jBPM 3.1.1 and Hibernate 3.2.0 GA
on Linux running kernel 2.4.31 and Sun Client VM build 1.5.0_06-b05.
I apologize if I am reporting this issue indirectly through jBPM but that is how I can
consistently reproduce the problem.
I created 62 process instances then, in a loop, complete the single task instance of each
process instance by creating a JbpmContext, ending the task instance, then closing the
JbpmContext. I will get the NoSuchMethodError exception on the 33rd iteration.
The error does not occur for 50 process instances. I get the error on the 24th iterator
for 75 process instances and on the 17th iteration for 100 process instances. I
haven't tried other combinations.
I hope this helps. In the meantime my workaround is to create the JbpmContext outside the
loop and close it only after going through all the process instances.
I've attached the JUnit test case, the jBPM process definition file, and the
hibernate.properties file. I use the default hibernate.cfg.xml from the jBPM archive.
java.lang.NoSuchMethodError: <persistent
class>.getHibernateLazyInitializer()
-----------------------------------------------------------------------------
Key: HHH-1293
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
Project: Hibernate3
Type: Bug
Versions: 3.1.1
Reporter: Andreas Schildbach
Assignee: Scott Marlow
Priority: Blocker
Fix For: 3.2.0.cr4
Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch,
CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3,
HibernateLazyInitializerTest.java, TestProcess.xml, hibernate.properties, hibernate3.jar,
manysessions.tgz, patch.CGLIBLazyInitializer.java
As documented in
http://forum.hibernate.org/viewtopic.php?t=940119
some people (including me) are getting this exception with the final release of Hibernate
3.1:
java.lang.NoSuchMethodError:
de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
at
de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
at
org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
at
org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
at
org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
at
org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at
org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
The exception varies with the actual persistent class in use. Most people seem to be
using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very
start of the application, but it takes "several invocations"/"some
time" until it appear, but then it appears very often.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira