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: java.lang.ExceptionInInitializerError
PostPosted: Tue Sep 26, 2006 1:25 am 
Newbie

Joined: Tue Sep 26, 2006 1:08 am
Posts: 1
Location: India,Kerala
I am new to Hibernate and i am using NetBeans IDE 5.0 for developing J2EE application which uses Struts and Hibernate.

There is a User class and UserFacade class, I am creating an object of UserFacade in an execute() method of Struts Action class, but when ever calling generate() (generating few datas) , or findByName(String) method it shows the following exception.

Code:
java.lang.ExceptionInInitializerError
   com.model.HibernateUtil.getSessionFactory(HibernateUtil.java:42)
   com.model.HibernateUtil.currentSession(HibernateUtil.java:53)
   com.model.UserFacade.saveUser(UserFacade.java:11)
   com.model.UserFacade.generate(UserFacade.java:23)
   com.service.action.LoginAction.execute(LoginAction.java:44)
   org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



But in some other example i have executed the same code using JSP page, there werent such Exceptions. Please help me to solve this problem.


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.