-->
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: could not parse mapping document
PostPosted: Mon May 28, 2007 12:34 am 
Beginner
Beginner

Joined: Thu May 17, 2007 2:41 pm
Posts: 48
I checked for this error which other people have reported. In each case, there really was something wrong with their hbm file. However, in my case, I know the hbm file is good, because, I used it without error in a different execution path. This time I am using ant to do SchemaUpdate. the relevant files as follows:

<target name="schemaupdate">
<taskdef name="schemaupdate"
classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask"
classpathref="hibernate.classpath"/>

<schemaupdate
properties="hibernate.properties"
quiet="no">
<fileset dir="">
<include name="model/*.hbm.xml"/>
</fileset>
</schemaupdate>
</target>



<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping >
<class name="model.AccountView" >
<id name="enumItemId" type="int" column="ENUMITEMID" >
<generator class="native" />
</id>
<many-to-one name="user" class="com.jcalc.core.entity.UserAbs" column="USERID" not-null="true" insert="false" update="false" />
<property name="name" column="NAME" />
<property name="value" column="VALUE" type="serializable" />
</class>

</hibernate-mapping>

what else should I be looking for?

also, I have a log4j.properties file in the same dir as build.xml, but I get an error
[schemaupdate] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[schemaupdate] log4j:WARN Please initialize the log4j system properly.

do I need to declare log4j else where?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 8:39 pm 
Beginner
Beginner

Joined: Thu May 17, 2007 2:41 pm
Posts: 48
now, interesting!

I removed <property name="name" column="NAME" />

now the ant task completes. How could this property causes a parsing error?

in the java classes, the "name" attribute is as stated in a supeclass, same as the "value" attribute, which caused no complains.


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.