Hello forum. My hibernate JPA project (SE application) throws error and not running because old (2.0 ) DTD and therefore won't let me run it when disconnected from the Internet as you probably know.
I do all my configuration from persistence.xml . didn't write any hbm file and I didn't had to specify DTD in any file. I don't get where did this old DTD came from ?
I'll be glad to get any hint on what causing this issue.
This is the log:
23:01:45,573 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd] 23:01:45,573 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 23:01:45,573 DEBUG DTDEntityResolver:44 - unable to locate [http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd] on classpath 23:01:45,574 ERROR DTDEntityResolver:46 - Don't use old DTDs, read the Hibernate 3.x Migration Guide! Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: btix.enginguo.entities] Unable to configure EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) at Entities.EntitiesAdapter.initEntityManager(EntitiesAdapter.java:110) at Entities.EntitiesAdapter.Init(EntitiesAdapter.java:49) at d.pga.<init>(apter.java:44) at d.rider.main(Rider.java:83) Caused by: org.hibernate.MappingException: Error while parsing file: net/sf/hibernate/odmg/Name.hbm.xml at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:937)
dependencies I have in my pom.
<dependencies> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.1.12</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.hyperjaxb3</groupId> <artifactId>hyperjaxb3-ejb-runtime</artifactId> <version>0.5.3</version> <scope>compile</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.4.0.GA</version> <scope>compile</scope> </dependency> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>8.3-603.jdbc3</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.hyperjaxb3</groupId> <artifactId>hyperjaxb3-ejb-schemas-customizations</artifactId> <version>0.5.3</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.hyperjaxb3</groupId> <artifactId>hyperjaxb3-ejb-roundtrip</artifactId> <version>0.5.3</version> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.5.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.sun.xsom</groupId> <artifactId>xsom</artifactId> <version>20081112</version> </dependency> <dependency> <groupId>org.jvnet.jaxb2_commons</groupId> <artifactId>annotate</artifactId> <version>0.4.1.5</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.4.0.GA</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.annox</groupId> <artifactId>annox</artifactId> <version>0.4.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>bcel</groupId> <artifactId>bcel</artifactId> <version>5.1</version> <type>jar</type> </dependency>
Got to mention this is a hyperjaxb assisted project.
|