-->
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.  [ 1 post ] 
Author Message
 Post subject: OLD DTD warning when using hibernate JPA
PostPosted: Tue Oct 27, 2009 7:58 pm 
Newbie

Joined: Tue Oct 27, 2009 7:46 pm
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.