Hibernate fails after 1500 sessions on client Java5 JVM
Description
Attachments
duplicates
Activity
Steve Ebersole March 21, 2011 at 7:06 PM
Bulk closing stale resolved issues
Konstantin Ignatyev March 29, 2006 at 5:42 PM
In my experiments 3.1.3 does not exhibit the errorneous behavior for my test scenario, which never throsw "NoSuchMethod" but did no initialize fields properly.
Could you run my test case in your environment and check what tre result is?
In any case -server JVM flag should help.

BimP March 29, 2006 at 11:08 AM
Actually I just tried Hibernate 3.1.3 on my linux server with Java 1.5.0_06 and Resin 3.0.14 and I'm still getting the hibernate failures after about 1500 sessions:
=========================================================
500 Servlet Exception
java.lang.NoSuchMethodError: com.orange.common.Photo.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
at com.orange.common.Photo$$EnhancerByCGLIB$$44dfbf26.getHibernateLazyInitializer(<generated>)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
at org.hibernate.type.EntityType.resolve(EntityType.java:303)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
======================================================
Any othe suggestions?
Konstantin Ignatyev March 21, 2006 at 11:23 PM
H 3.1.3 fixes the issue
Details
Assignee
Diego PlentzDiego PlentzReporter
Konstantin IgnatyevKonstantin IgnatyevFix versions
Priority
Major
Details
Details
Assignee

There is interesting production grade bug on Linux: if JVM is in client mode then after 1500 sessions Hibernate starts to behave strangely.
If -server option is used then test passes.
Repro:
-untar the content in the hibernate source directory;
apply diff to the AllTests.java or simply add line to the class suite.addTest( ManySessionsTest.suite() );
run test :
ant -f build-test.xml junit -Dtestpattern=Many*Test -Dvm=client
this time test fails
ant -f build-test.xml junit -Dtestpattern=Many*Test -Dvm=server
now it passes
The bug affects 3.1 line and is present in the 3.2 trunc
This is complementary to bug