-->
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: schemaexport from ant build file
PostPosted: Mon Feb 19, 2007 5:13 pm 
Newbie

Joined: Mon Feb 19, 2007 4:54 pm
Posts: 1
Hi there,

The last couple of hours ive been breaking my head over this build error : "Schema text failed: Could not parse mapping document from file". Whatever I change to my build.xml file or classpath, the error just keeps repeating itself.

I'm using Eclipse 3.2 and MySQL db server, but never mind that... I'm sure it's my ANT build file that is wrong and I havent got the slightest clue where to look for a sollution.

It might still have something to do with the classpath. I set my classpath, including all relevant hibernate jars, through the eclipse ANT property form. Should I maybe be using the taskdef attribute 'classpathref' instead?

Hibernate version: hibernate 3

Mapping file:
<?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="Member" table="member">
<id name="id" column="id">
<generator class="increment"/>
</id>
<property name="firstName" column="firstName"/>
<property name="lastName" column="lastName"/>
</class>
</hibernate-mapping>


ANT build.xml, relevant part:
<target name="schemaexport" depends="compile"
description="Exports a generated schema to DB and file">
<echo>
Exporting schema
</echo>

<taskdef name="hibernatetool"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"/>

<hibernatetool
properties="hibernate.properties"
drop="true"
create="true"
output="mrs.sql"
text="no"
delimiter=";">
<fileset dir="bin/org/viafrica/data">
<include name="**/*.hbm.xml"/>
</fileset>
</hibernatetool>
</target>

Full stack trace of any exception that occurs:
Buildfile: D:\Java Projects\ViafricaMRS\build.xml
compile:
compress:
schemavalidate:
[schemavalidator] Feb 19, 2007 9:48:15 PM org.hibernate.cfg.Environment <clinit>
[schemavalidator] INFO: Hibernate 3.2.2
[schemavalidator] Feb 19, 2007 9:48:15 PM org.hibernate.cfg.Environment <clinit>
[schemavalidator] INFO: loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=300, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.c3p0.idle_test_period=3000, hibernate.format_sql=true, hibernate.c3p0.min_size=5, hibernate.connection.username=bart, hibernate.connection.url=jdbc:mysql://localhost/mrs, hibernate.show_sql=true, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****}
[schemavalidator] Feb 19, 2007 9:48:15 PM org.hibernate.cfg.Environment buildBytecodeProvider
[schemavalidator] INFO: Bytecode provider name : cglib
[schemavalidator] Feb 19, 2007 9:48:15 PM org.hibernate.cfg.Environment <clinit>
[schemavalidator] INFO: using JDK 1.4 java.sql.Timestamp handling
[schemavalidator] Feb 19, 2007 9:48:16 PM org.hibernate.cfg.Configuration addFile
[schemavalidator] INFO: Reading mappings from file: D:\Java Projects\ViafricaMRS\bin\org\viafrica\data\Member.hbm.xml
[schemavalidator] Feb 19, 2007 9:48:16 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[schemavalidator] INFO: Mapping class: Member -> member

BUILD FAILED
D:\Java Projects\ViafricaMRS\build.xml:43: Schema text failed: Could not parse mapping document from file D:\Java Projects\ViafricaMRS\bin\org\viafrica\data\Member.hbm.xml

Total time: 1 second



Thanx for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 6:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
run with ant -verbose to get the stacktrace that explains what is wrong.

p.s. what version of the tools are you using here ?

_________________
Max
Don't forget to rate


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.