-->
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.  [ 1 post ] 
Author Message
 Post subject: Ant <schemaexport> task
PostPosted: Thu Sep 23, 2004 4:24 am 
Newbie

Joined: Thu Sep 23, 2004 4:11 am
Posts: 12
Location: Gold Coast, Australia
Hibernate 2.1.6

I am relatively new to Hibernate - I've been trying to get the &lt;schemaexport&gt; Ant task to work but to no avail (as per section 15.1.4 of the manual). Specifically, the task looks for my .class file(s) of the entities that have been mapped. If I jar up the .class files that can't be found (java.lang.ClassNotFoundException), then copy that jar to $ANT_HOME/lib, I have no problem; but clearly, this is not a correct approach.

I have created an isolated case (as a jar/zip file) to help demonstrate my dilemma. It contains the following files:
src/com/foo/Bar.java - an example entity being mapped
build.xml - An Ant build file that fails when I attempt to use the &lt;schemaexport&gt; task
hibernate.properties - A properties file for the &lt;schemaexport&gt; task
Manifest.mf - irrelevant
stderr.txt - The standard error output after executing 'ant -v'
stdout.txt - The standard out output after executing 'ant -v'
The test case can be downloaded from http://www.xdweb.net/~dibblego/miscella ... r/test.jar (5045 bytes - unbuilt)
or
http://www.xdweb.net/~dibblego/miscella ... -built.jar (7426 bytes - built, but, of course, build fails)

The following is some information which may or may not be relevant:
Using Windows 2003 Enterprise Edition
Using Apache Ant 1.6.1 (February 12 2004)
Using Sun J2SE SDK 1.4.2_04-b05
Using Hibernate 2.1.6
hibernate2.jar and it's dependencies are in $ANT_HOME/lib

To summarise the output of the Ant build, I am receiving a java.lang.ClassNotFoundException because of
Quote:
C:\test\build.xml:42: Schema text failed: net.sf.hibernate.MappingException: persistent class [com.foo.Bar] not found


Any assistance or suggestions to resolve this issue are most appreciated.
[/quote]

_________________
SCJP 1.4, SCJD
Software Engineer, IBM Australia


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.