Hibernate 2.1.6
I am relatively new to Hibernate - I've been trying to get the <schemaexport> 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 <schemaexport> task
hibernate.properties - A properties file for the <schemaexport> 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]