-->
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: HibernateToolTask & ClassNotFoundException: StringHelper
PostPosted: Wed Aug 24, 2011 6:19 pm 
Newbie

Joined: Thu May 01, 2008 11:52 am
Posts: 17
Trying to use hibernate-tools.jar to run this ant task linking against Hibernate4:

Code:
<target name="hibernate-codegen">
   <hibernatetool destdir="src">
      <configuration configurationfile="hibernate_config/hibernate-ant-remote.cfg.xml">
         <fileset dir="hibernate_config/hbm">
            <include name="**/*.hbm.xml"/>
         </fileset>
      </configuration>
      <hbm2java jdk5="true" ejb3="true"/>
   </hibernatetool>
</target>


Works fine when linking against Hibernate3.6, but Hibernate4 gets pretty far along but then...


Code:
INFO: HHH00220:Reading mappings from file: C:\dev\as2\hibernate_config\hbm\Title.hbm.xml
Aug 24, 2011 6:00:59 PM org.hibernate.internal.CoreMessageLogger_$logger readingMappingsFromFile
INFO: HHH00220:Reading mappings from file: C:\dev\as2\hibernate_config\hbm\TitleLicense.hbm.xml
Aug 24, 2011 6:01:00 PM org.hibernate.tool.Version <clinit>
INFO: Hibernate Tools 3.4.0.CR1
C:\dev\as2\adapt_server\ant\build.xml:84: java.lang.NoClassDefFoundError: org/hibernate/util/StringHelper
   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   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:1397)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        ...


Looks like StringHelper was removed from hibernate4. Any suggestions which combination of jars I should use to start my migration to hibernate4 for this ant task?

These are the jars I link against:
    commons-logging-1.1.1.jar
    dom4j-1.6.1.jar
    freemarker.jar
    hibernate-tools.jar
    hibernate-validator-3.0.0.jar
    slf4j-api-1.6.1.jar
    slf4j-simple-1.6.1.jar
    hibernate-core-4.0.0.CR1.jar
    hibernate-jpa-2.0-api-1.0.0.Final.jar
    hibernate-commons-annotations-3.2.0.Final.jar
    jboss-logging-3.0.0.Beta5.jar
    jta-1.1.jar

Thanks.


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.