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.  [ 1 post ] 
Author Message
 Post subject: Help with java.lang.ExceptionInInitializerError
PostPosted: Thu Nov 25, 2010 5:40 am 
Newbie

Joined: Thu Nov 25, 2010 5:29 am
Posts: 1
Hi all,

Even tough I have experience with openJPA...
I'm new to hibernate and I'm trying to run a few online tutorials in order to get an understanding of how it handles things and get an overview performance wise....

My issue is that any single tutorial I run, even though I'm strictly following the instructions ends with the same error....
The error manifest through line "SessionFactory factory = new AnnotationConfiguration().configure().buildSessionFactory();"
and gives the follwing output...
I just don't undestand why this is happening in every single tutorial I have used....
I have the hibernate.cfg.xml in the root directory and added all mentioned jars in the classpath; I have used tutorials with both MySQL and HSQL dbases and both with annotations and configurations files, the result is always the same.....

Any suggestions will be more than welcome....

Many thanks in advance.....

Mike

0 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.hibernate.cfg.Configuration.reset(Configuration.java:249)
at org.hibernate.cfg.AnnotationConfiguration.reset(AnnotationConfiguration.java:289)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:216)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:220)
at org.hibernate.cfg.AnnotationConfiguration.<init>(AnnotationConfiguration.java:168)
at sample.PopulateMessages.main(PopulateMessages.java:13)
Caused by: java.lang.NullPointerException
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:167)
at org.hibernate.cfg.Environment.<clinit>(Environment.java:585)
... 6 more


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

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.