Issue Details (XML | Word | Printable)

Key: HHH-1579
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Diego Plentz
Reporter: Konstantin Ignatyev
Votes: 2
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

Hibernate fails after 1500 sessions on client Java5 JVM

Created: 17/Mar/06 11:32 AM   Updated: 10/Sep/07 05:55 PM
Component/s: None
Affects Version/s: 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1, 3.2.0.alpha2
Fix Version/s: 3.2.0.cr4

Time Tracking:
Not Specified

File Attachments: 1. File manysessionsTest.tgz (2 kB)

Environment:
Environment: Java 5 on linux 32 and 64 bit version

Note: by default 64 bit version of JDK is in server mode.
Issue Links:
Duplicate
 


 Description  « Hide
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 HHH-1293

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Konstantin Ignatyev added a comment - 21/Mar/06 03:23 PM
H 3.1.3 fixes the issue

Bim added a comment - 29/Mar/06 03: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 added a comment - 29/Mar/06 09:42 AM
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.