-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 4.3.1 Tomcat SEVERE listenerStart
PostPosted: Wed Mar 05, 2014 1:40 pm 
Newbie

Joined: Wed Mar 05, 2014 1:16 pm
Posts: 4
apache-tomcat-7.0.47
Hibernate 4.3.1
MySQL 3.6.16

I have servlet that connects to MySQL using Hibernate. When I deployed it in Tomcat, I got "SEVERE: listenerStart" without any stack trace. Then the servlet contextDestroyed(...) was called. I traced it to the line Configuration config = new Configuration(); So the Configuration constructor causes this error. However, the same code works outside Tomcat.

I reversed back to Hibernate 4.2.7 and it works fine in Tomcat. I still want to use the latest Hibernate so any help would be appreciated!

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Hibernate 4.3.1 Tomcat SEVERE listenerStart
PostPosted: Wed Mar 05, 2014 2:41 pm 
Newbie

Joined: Wed Mar 05, 2014 1:16 pm
Posts: 4
I upgraded to Hibernate 4.3.4 and still got the error but this time on config.buildSessionFactory(serviceReg). A little dig into the servlet class path and I found the answer.

I'm using c3p0 and the code that works outside Tomcat has c3p0 on its path. The servlet code has everything under hibernate/lib/required but without c3p0 under hibernate/lib/optional. Since I'm using "optional stuff", I need to include them in the servlet.

So for those of you who may have similar problems, add c3p0-0.9.2.1.jar, hibernate-c3p0-4.3.4.Final.jar and mchange-commons-java-0.2.3.4.jar (or mchange-commons-java-0.2.6.3.jar) to your class path. It'll fix the "SEVERE: error listenerStart" in the servlet.


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