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.
|