-->
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.  [ 2 posts ] 
Author Message
 Post subject: Error parsing XML: XML InputStream. Can someone help
PostPosted: Wed Sep 13, 2006 12:33 pm 
Newbie

Joined: Tue Sep 12, 2006 2:20 pm
Posts: 6
here is my mapping file generated by Sychronizer:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="support.operations.sci">
<class name="Usecase" table="USECASE">
<meta attribute="sync-DAO">false</meta>
<meta attribute="sync-DAO">false</meta>
<meta attribute="sync-DAO">false</meta>
<property name="Name" column="NAME" type="string" not-null="true" length="10"/>
<property name="Description" column="DESCRIPTION" type="string" not-null="false" length="128"/>
</class>
</hibernate-mapping>

I am using Hibernate 3.1.3, here is the error I got when I tried to run:

Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: Hibernate 3.1.3
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: hibernate.properties not found
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: using CGLIB reflection optimizer
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Configuration
INFO: Reading mappings from resource: Usecase.hbm.xml
Sep 13, 2006 11:27:49 AM org.hibernate.util.XMLHelper
SEVERE: Error parsing XML: XML InputStream(13) The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
Could not read mappings from resource: Usecase.hbm.xml
Exception in thread "main" java.lang.NullPointerException
at support.operations.sic.test.HibernateTest.main(HibernateTest.java:51)


HELP!!! I got only meta and properties in the Class Element, why is the parser complaining about????


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 2:05 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
from the error:

Quote:
...,(id|composite-id),...

this means that
Code:
<id>
or
Code:
<composite-id>
is required.

_________________
nathan


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