Hallo zusammen!
Ich habe folgendes Problem.
Ich wollte mein Web-Projekt von Hibernate 3.3.1 auf Hibernate 3.6 updaten. Bekomme dann aber folgende Fehlermeldung:
- JspRedirector: init
- Hibernate Commons Annotations 3.2.0.Final
- Hibernate 3.6.2.Final
- hibernate.properties not found
- Bytecode provider name : javassist
- using JDK 1.4 java.sql.Timestamp handling
- configuring from resource: /hibernate.cfg.xml
- Configuration resource: /hibernate.cfg.xml
- recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
- Reading mappings from resource : de/schulungdb/model/Lehrgangskategorie.hbm.xml
- recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
(...)
- Configured SessionFactory: SchulungDB
- Building SessionFactory failed.
java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:96)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1358)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1829)
at de.bawv.schulungdb.HibernateUtil.<clinit>(HibernateUtil.java:121)
at de.bawv.schulungdb.dao.SchulungDAO.<init>(SchulungDAO.java:29)
at de.bawv.schulungdb.dao.NutzerDAO.<init>(NutzerDAO.java:35)
at de.bawv.schulungdb.ProtectFilter.doFilter(ProtectFilter.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: javax.persistence.EntityListeners
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
... 23 more
- Servlet.service() for servlet schulungdb threw exception
java.lang.NoClassDefFoundError: Could not initialize class de.bawv.schulungdb.HibernateUtil
at de.bawv.schulungdb.ProtectFilter.doFilter(ProtectFilter.java:249)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
- jsp: initIch habe alle libs aus dem requiered und dem jpa verzeichnis in mein lib-Verzeichnis kopiert. Auch habe ich die Hibernate3.jar und die hibernate-jpa-2.0-api-1.0.0.Final.jar in den Buildpath eingestellt.
Trotzdem bekomme ich immer die o. g. Fehlermeldung. Mit Hibernate 3.5.2 funktioniert noch alles normal erst ab Hibernate 3.6 nicht mehr. Könnte es daran liegen, daß ich noch die XML-Methode für das Mapping und die Hibernate.cfg verwende?
Ich hoffe einer von euch kennt eine Lösung für das Problem. Ich habe schon einige Forenbeiträge zu dem Thema gelesen aber noch keine funktionierende Lösung gefunden.
Im Voraus schonmal vielen Dank für euere Hilfe
Gruß
Three of Twelve