-->
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.  [ 3 posts ] 
Author Message
 Post subject: java.lang.NoClassDefFoundError: javax/persistence/EntityList
PostPosted: Mon Mar 28, 2011 4:40 am 
Newbie

Joined: Wed Sep 17, 2008 12:30 pm
Posts: 3
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: init


Ich 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


Top
 Profile  
 
 Post subject: Re: java.lang.NoClassDefFoundError: javax/persistence/EntityList
PostPosted: Mon Apr 04, 2011 3:29 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
javax/persistence/EntityListeners ist definitiv eine Klasse, welche in hibernate-jpa-2.0-api-1.0.0.Final.jar gefunden werden sollte.
Also ist entweder Dein hibernate-jpa-2.0-api-1.0.0.Final.jar kaputt,
oder dieser jar file wird aus irgendeinem Grund nicht mit in Dein Klassenpfad eingebunden.


Top
 Profile  
 
 Post subject: Re: java.lang.NoClassDefFoundError: javax/persistence/EntityList
PostPosted: Thu Apr 07, 2011 7:56 am 
Newbie

Joined: Wed Sep 17, 2008 12:30 pm
Posts: 3
Habe das Problem gelöst.
Mußte die Libaries nicht nur in Build-Path eintragen sondern auch unter Deplayment Assambly


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