-->
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: Error with <hbm2doc>
PostPosted: Fri Nov 16, 2007 5:38 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 1:17 pm
Posts: 78
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 1:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
make sure you don't have conflicting classpaths in the taskdef and in the classpath that you use for hibernatetool call.

_________________
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.