wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Could not parse mapping document from resource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Could not parse mapping document from resource" Watch "Could not parse mapping document from resource" New topic
Author

Could not parse mapping document from resource

Singh Anisha
Ranch Hand

Joined: May 09, 2012
Posts: 100

Could not parse mapping document from resource

I am getting this message when trying to run my first hibernate program.


This is the code of mapping file. What wrong I have done??
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 107

It's been a while that I've used xml for entity mapping. May be you can try using annotation. An example here.


Thanks,
Tushar (SCJP 1.5)
Singh Anisha
Ranch Hand

Joined: May 09, 2012
Posts: 100

I am in starting phase so the way till the time i have learnt is to do mapping in xml.
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 107

Does the class - Contact has a package ?If yes, add the fully qualified class name. So, instead of Contact it may be something like com.foo.Contact. A similar post here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could not parse mapping document from resource
 
Similar Threads
select in hibernate
error in running HQL Query
An association from the table "dependent" refers to an unmapped class: "Independent"
How to use hibernate with .hbm.xml file instead of annotations?
java.lang.ClassNotFoundException: javax.persistence.JoinTable