-->
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.  [ 8 posts ] 
Author Message
 Post subject: JVM crash when using CGLIB
PostPosted: Thu Apr 01, 2004 8:52 pm 
Beginner
Beginner

Joined: Tue Feb 03, 2004 10:12 pm
Posts: 20
Location: San Francisco
Hi-
I'm using Hibernate 2.1.2 with CGLIB 2. As soon as I add a lazy="true" in one of my class definition (even if it is not used by another class), the JVM crashes. My environment is Tomcat 5.0.18 on Solaris Sparc 8. I have tried with 1.4.2_02 and 1.4.2_04 with the same result. I could get more details with 1.5.0 beta (but it still crashes):

Code:
Stack: [0xffffffff0d302000,0xffffffff0d401c50),  sp=0xffffffff0d3f9190,  free space=988k                                                                       
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j  net.sf.hibernate.proxy.HibernateProxy$$FastClassByCGLIB$$d0b243e2.getIndex(Lnet/sf/cglib/core/Signature;)I+8                                                 
j  net.sf.cglib.proxy.MethodProxy.create(Ljava/lang/ClassLoader;Ljava/lang/Class
;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/sf/cglib/proxy/MethodProxy;+42
....


Has anyone seen such an error before? And if so did you find a workaround? I can always reproduce. It happens when Hibernate loads the mapping in the SessionFactory.

Thanks

_________________
Nicolas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 3:01 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
As I understand it is SUN's JVM. Looks like a bug in JIT, try to dissable just in time compiler ( -Xint commandline parameter ) and report this bug for SUN (set "cglib.debugLocation" to dump generated classes to file).
I use cglib-1.0 without problems on Solaris Sparc 8 servers and JDK 1.4.x., but I will try to run cglib2 on this platform, probably I will reproduce it too.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 3:07 pm 
Beginner
Beginner

Joined: Tue Feb 03, 2004 10:12 pm
Posts: 20
Location: San Francisco
Indeed I got it to work with -Xint option. I could get a detailed report with JDK1.5 (nothing was found with 1.4.2_x). The problem will be to give a report to Sun as reproducing it probably involves Tomcat classloading. I have no problem with another standalone program that uses the same mapping.

My platform seems quite "standard": Tomcat 5 with Hibernate 2.1.2. I don't feel I am doing anything special so I wonder if anybody ran into this before.

Thanks

_________________
Nicolas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 3:09 pm 
Beginner
Beginner

Joined: Tue Feb 03, 2004 10:12 pm
Posts: 20
Location: San Francisco
By the way, should Hibernate 2 work with CGLIB 1?

_________________
Nicolas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 4:46 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
nickonet wrote:
By the way, should Hibernate 2 work with CGLIB 1?

There is some way to register custom proxy factory, but I am not sure this API is released.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 03, 2004 4:00 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
BTW, how many methods has this problem class ?
I have problems with "large" classes compiled by javac on jdk1.4.* too, the same code runs on jdk1.3 withot problems on all platforms.


Top
 Profile  
 
 Post subject: Any workaround found for CGLIB JVM Crash
PostPosted: Tue Jul 06, 2004 12:54 pm 
Newbie

Joined: Fri Jul 02, 2004 9:53 am
Posts: 3
Wondering if anyone knows of a fix/workaround for this? Has there been a subsequent release on CGLIB that works better on jdk 1.4? We are also seeing JVM crashes & core dumps on solaris using hiberate 2.1, and I'm guessing it could be this same issue. Our enviro:

JDK 1.4.1_05
Solaris 9
Hibernate 2.1. [Not sure of which sub-version]
CGLIB 2.0 - RC2

Any help appreciated....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 12:56 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Try a non-beta version of CGLib first, Hibernate 2.1.4 comes with CGlib 2.0.1.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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

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.