Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hibernate mapping

807591Jun 4 2008 — edited Jun 5 2008
I get an error when i do ->
new Configuration().configure();  
The error is "Could not parse mapping document from resource Client.hbm.xml"

Glassfish gives the messages:

configuring from resource: /hibernate.cfg.xml
Configuration resource: /hibernate.cfg.xml
Reading mappings from resource : Client.hbm.xml
Error parsing XML: XML InputStream(1) Document is invalid: no grammar found.
Error parsing XML: XML InputStream(1) Document root element "hibernate-mapping", must match DOCTYPE root "null".


Here is my simple Client.hbm.xml mapping file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class dynamic-insert="false" dynamic-update="false" mutable="true" 
name="icmmclientsmanager.Client" 
optimistic-lock="version" 
polymorphism="implicit" 
select-before-update="false" table="Clients">
<id column="cId" name="cid">
<generator class="identity"/>
</id>
<property column="cName" name="cName"/>
<property column="cAddress" name="cAddress"/>
</class>
</hibernate-mapping>
"Please help!!"
Edited by: dof on Jun 4, 2008 6:38 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2008
Added on Jun 4 2008
9 comments
761 views