-->
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.  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Failure with Hibernate 2.1.2 with IBM JDK1.3.1
PostPosted: Tue Feb 10, 2004 5:20 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 12:44 pm
Posts: 40
Hi,

I have just spent a couple of days trying to track down a possible fault when running the shipped Hibernate2.jar from v2.1.2 under IBM JDK1.3.1 in Websphere Studio.
Whilst loading the schema up via...
Code:
sessionFactory = new Configuration().configure().buildSessionFactory()

...it failed after loading only a couple of the 47 hbm.xml files.

I switched into debug mode and tracked it down to the following method in net.sf.hibernate.type.TypeFactory...
Code:
   public static PersistentCollectionType set(String role) {
      return new SetType(role);
   }

...at which point the process just bombed out with no exceptions or any message of any sort. I tried setting breakpoints in the constructors of SetType and PersistentCollectionType to no avail.

Having then read a couple of postings mentioning IBM JDKs, I recompiled the Hibernate2.jar using the IBM compiler for JDK1.3.1 and tried again. Everything now works apart from the following strange message...
Code:
   mmiVerifyTpAndGetWorkSize: stack_height=1 should be zero; exit

...which I believe is something to do with the multi-mode interpreter in the JVM (IBM's Hotspot equivalent).

Further to this, I compared the new .jar file to the original and found 3 files fewer in the IBM compiled version, all of which turned out to be anonymous inner classes...

net.sf.hibernate.impl.CriteriaImpl$1
net.sf.hibernate.property.BasicPropertyAccessor$1
net.sf.hibernate.util.IdentityMap$1


This is all a bit of a headache as one presumes that that a piece of java code will execute on any compliant JVM. From the above problems, this appears to be not the case. It would be interesting to see if a version compiled using IBMs javac, executes successfully on Sun's JVMs.


Regards
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 5:53 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
"mmiVerifyTpAndGetWorkSize: stack_height=1 should be zero; exit"
It looks like a bug in compiler.

Do you tried to run Websphere Studio on SUN JVM ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 6:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Have you tried switching of Hotspot for your VM just for testing?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 12:18 pm 
Beginner
Beginner

Joined: Mon Nov 24, 2003 12:44 pm
Posts: 40
Yep. Setting -Djava.compiler=NONE has stopped the wierd mmi*** messages.

Cheers
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 12:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
So that rather seems like a JVM issue - complain to IBM :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 5:01 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 12:44 pm
Posts: 40
I sent a request for info to IBM yesterday.

Did you have any thoughts on the fact that I had to re-compile Hibernate using the IBM JDK to get it to work?

Cheers
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 6:10 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It happen sometimes. Hibernate is build on a 1.4.2 (IBM I think) and some semantic are different and may fail on a 1.3.1, just recompiling works like a charm.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: JRE 1.3.1
PostPosted: Thu Feb 12, 2004 11:02 am 
Newbie

Joined: Wed Sep 24, 2003 12:14 pm
Posts: 16
Location: Brazil
Chris,

I'm with the same problem using Novell Extend App Server 4.0 (SilverStream). Hibernate works in 5.0 (JRE 1.4.1) but not in 4.0 (JRE 1.3.1). I was keeping an Hibernate older version (february 2003) that works on 1.3.1 but I need a few new features now...

Could you email me with your hibernate version compiled to 1.3.1? My email is alvim@powerlogic.com.br

I never needed to compile it so it would be helpfull...

Maybe the hibernate guys could keep this version for these cases - There's still many App Servers that works on 1.3.1!

Thanks in advance,

Paulo
Powerlogic - Brazil

_________________
Paulo Alvim
Powerlogic - Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 11:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Building Hibernate yourself should really be painless tough, just download the source, have ant installed and go to the source directory and run ant. I don't think the team is so fond of providing yet more versions for different JVMs :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 11:14 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It takes 5 minutes if you have ant installed.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 12:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate is compiled on Sun JDK 1.4.2


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 2:46 pm 
Beginner
Beginner

Joined: Mon Nov 24, 2003 12:44 pm
Posts: 40
I agree. In fact the Hibernate download has the source in it already. I just shoved it into Eclipse and exported the jar. Simple.

However, there is a potential that some of the 3rd Party libraries e.g. cglib might need to be recompiled as well. It might explain my mmi*** messages.

Best regards
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:07 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Do you think it is the project job to handle a build for
    Sun JVM
    BEA JRockit
    IBM JVM
    ...


each one in 1.4.x, 1.3.1, etc...

There are a lot of possibilities. Every single lib used by hibernate is open source. It's easy to rebuild them if your env need it.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 11:43 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 12:44 pm
Posts: 40
Not at all. As long as Hibernate source is available, then I am happy to recompile it.
The problem lies in knowing when one needs to recompile a library. I only did it because the Websphere Studio debugger went off the rails when stepping through the hibernate internals.

I just wish that all these different JVMs would handle the bytecode produced by other manufacturers compilers without complaining. But that is a java issue and not a Hibernate one.

Best regards,
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 11:48 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just wait until we get more bytecode manipulation, i've seen some projects jump on that in the last half year. Still don't like it.

_________________
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.  [ 19 posts ]  Go to page 1, 2  Next

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.