Here is my Ant script:
Code:
<target name="create-db-documentation">
<ant antfile="build-persistence-jar.xml" target="jar"/>
<hibernateTool destdir="${ddl.dir}" classpath="class.path.libs">
<jpaconfiguration persistenceunit="tableGenerator"/>
<hbm2doc destdir="${ddl.dir}" />
</hibernateTool>
</target>
Here now is my error:
Code:
java.lang.NoClassDefFoundError
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
It is odd to have a NoClassDefFoundError without a class name. This makes things very hard to debug. I did find this resource:
"If I recall correctly, the most common reason for a NoClassDefFoundError with no class name is because an attempt was previously made to load that class, and one of its static initializers threw an exception (most commonly, due to lack of some permission)."
I have all the appropriate JARs and files in my classpath, and I am in fact able to generate tables from my Java classes. Any insight as to the cause of this error is greatly appreciated.
Thanks.