I am getting a exception for the following simple ant file:
Code:
<project name="tool test" basedir=".">
<import file="ant-scripts/properties.xml"/>
<path id="rev-eng.classpath">
<fileset dir="${src.libs.dir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${build.classes.dir}"/>
</path>
<taskdef
name="hibernate-tool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="rev-eng.classpath"/>
<target name="test">
<hibernate-tool destdir="${src.java.dir}" classpathref="rev-eng.classpath"/>
</target>
</project>
The stack comes back as:
Code:
BUILD FAILED
java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at org.apache.tools.ant.IntrospectionHelper.<init>(IntrospectionHelper.java:180)
at org.apache.tools.ant.IntrospectionHelper.getHelper(IntrospectionHelper.java:350)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:376)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:344)
at org.apache.tools.ant.Task.maybeConfigure(Task.java:202)
at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:196)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
at org.apache.tools.ant.Task.perform(Task.java:347)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 22 more
Total time: 0 seconds
All the hibernate code was pulled from a maven repository using ivy.
I have checked the classpath referenced by rev-eng.classpath and it does contain hibernate-core.jar.
I can't find any other messages in the forum (or other forums) that address this problem.
Does anyone have any idea why this is happening?
Thanks.