My project was working until that point when I tried to set the character encoding to UTF-8.I added the \[code\]<property name="hibernate.connection.characterEncoding">utf8</property>\[/code\] line to my \[code\]hibernate.cfg.xml\[/code\].Now after a computer restart I'm getting this strange error:\[code\]java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration at dal.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:15) at dal.hibernate.HibernateDAOFactory.getSession(HibernateDAOFactory.java:25) at dal.hibernate.HibernateUserDAO.authenticate(HibernateUserDAO.java:23) at controller.servlet.LogIn.doPost(LogIn.java:63) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ... 22 more\[/code\]The first four classes in the stack are my classes.I see that the \[code\]new Configuration();\[/code\] calling causes the error, but I have the necessary JAR-s in the WEB-INF/lib:
- antlr-2.7.7.jar
- dom4j-1.6.1.jar
- hibernate-commons-annotations-4.0.1.Final.jar
- hibernate-core-4.1.9.Final.jar
- hibernate-jpa-2.0-api-1.0.1.Final.jar
- javassist-3.17.1-GA.jar
- jboss-logging-3.1.0.GA.jar
- jboss-transaction-api_1.1_spec-1.0.0.Final.jar
- mysql-connector-java-5.1.18-bin.jar