-->
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.  [ 9 posts ] 
Author Message
 Post subject: Help needed for java.lang.ExceptionInInitializerError
PostPosted: Wed Nov 09, 2005 6:26 am 
Newbie

Joined: Wed Oct 19, 2005 12:23 pm
Posts: 8
There is an application being developed with hibernate in java. Its giving this exception when deployed on tomcat5

java.lang.ExceptionInInitializerError
java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)

The location of this exception is a program where there is a statement
sessionFactory = new Configuration().configure().buildSessionFactory();

or it might be
org.hibernate.Session s = (org.hibernate.Session) session.get();

please help with a solution


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 6:41 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
Are you using gcj? If yes than that's your problem. Sun do make a real JVM which works correctly.


Top
 Profile  
 
 Post subject: Re: Help needed for java.lang.ExceptionInInitializerError
PostPosted: Wed Nov 09, 2005 6:54 am 
Newbie

Joined: Wed Oct 19, 2005 12:23 pm
Posts: 8
dorcus wrote:
There is an application being developed with hibernate in java. Its giving this exception when deployed on tomcat5

java.lang.ExceptionInInitializerError
java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)

The location of this exception is a program where there is a statement
sessionFactory = new Configuration().configure().buildSessionFactory();

or it might be
org.hibernate.Session s = (org.hibernate.Session) session.get();

please help with a solution


the application is not using cgj files . its using cglib files.


Top
 Profile  
 
 Post subject: Re: Help needed for java.lang.ExceptionInInitializerError
PostPosted: Wed Nov 09, 2005 6:56 am 
Newbie

Joined: Wed Oct 19, 2005 12:23 pm
Posts: 8
dorcus wrote:
There is an application being developed with hibernate in java. Its giving this exception when deployed on tomcat5

java.lang.ExceptionInInitializerError
java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)

The location of this exception is a program where there is a statement
sessionFactory = new Configuration().configure().buildSessionFactory();

or it might be
org.hibernate.Session s = (org.hibernate.Session) session.get();

please help with a solution


the application is using
cglib, hibernate3, ant , dom4j elated jars.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 7:04 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
http://java.sun.com/j2se/1.4.2/download.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 7:27 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
And?

It has nothing to do with your jars, it's related to your JVM.

GCJ is GNU's attempt at replicating a perfectly good JVM in their own unique style.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 10:44 am 
Newbie

Joined: Fri Oct 21, 2005 4:49 am
Posts: 13
exceptionininitializer will also be thrown if your configuration isn't working.

Check your hibernate.cfg.xml or however you configure hibernate and your database connection.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 10:50 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
torpid wrote:
exceptionininitializer will also be thrown if your configuration isn't working.

Check your hibernate.cfg.xml or however you configure hibernate and your database connection.


Please read the Javadoc for that exception. You are wrong.


Top
 Profile  
 
 Post subject: EIIE javaDoc
PostPosted: Wed Nov 09, 2005 11:13 am 
Newbie

Joined: Fri Oct 21, 2005 4:49 am
Posts: 13
All the javaDoc says is that it is thrown when trying to initialise a static variable. Often, that static variable is the SessionFactory since config is wrong.

But I admit in the general case, my previous post was not always right.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 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.