-->
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: probleme avec ant et hibernate tool
PostPosted: Thu Oct 08, 2009 7:10 pm 
Regular
Regular

Joined: Wed Jan 28, 2009 8:31 pm
Posts: 54
J essaie d apprendre
hibernate-tools.jar
ca commence mal
sur le premier example
ca plante
voici le ant
Code:
<path id="toolslib">
         <path location="lib/hibernate-tools.jar" />
         <path location="lib/hibernate3.jar" />
         <path location="lib/freemarker.jar" />
         <path location="${jdbc.driver.jar}" />
      </path>
      <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="toolslib" />

      <target name="hibernatetool">
         <hibernatetool destdir="${build.dir}/generated">
            <classpath>
               <path location="${build.dir}/classesTest" />
            </classpath>
         <configuration configurationfile="hibernate.cfg.xml" />
         <hbm2java />
         </hibernatetool>
      </target>


classpath
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
   <classpathentry kind="src" path="src"/>
   <classpathentry kind="src" path="test"/>
   <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="lib" path="lib/antlr-2.7.6.jar"/>
   <classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
   <classpathentry kind="lib" path="lib/javassist-3.4.GA.jar"/>
   <classpathentry kind="lib" path="lib/jta-1.1.jar"/>
   <classpathentry kind="lib" path="lib/hibernate3.jar"/>
   <classpathentry kind="lib" path="lib/slf4j-api-1.5.6.jar"/>
   <classpathentry kind="lib" path="lib/CallServicesJW.jar"/>
   <classpathentry kind="lib" path="lib/ctgclient.jar"/>
   <classpathentry kind="lib" path="lib/fda7.jar"/>
   <classpathentry kind="lib" path="lib/ojdbc14.jar"/>
   <classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
   <classpathentry kind="lib" path="lib/commons-beanutils-1.8.0.jar"/>
   <classpathentry kind="lib" path="lib/commons-lang-2.4.jar"/>
   <classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
   <classpathentry kind="lib" path="lib/slf4j-log4j12-1.5.6.jar"/>
   <classpathentry kind="lib" path="lib/iText-2.1.5.jar"/>
   <classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
   <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
   <classpathentry kind="lib" path="lib/dozer-5.1.jar"/>
   <classpathentry kind="lib" path="lib/hibernate-tools.jar"/>
   <classpathentry kind="lib" path="lib/dbunit-2.4.6.jar"/>
   <classpathentry kind="lib" path="lib/freemarker.jar"/>
   <classpathentry kind="output" path="build"/>
</classpath>


and my console with this error
Quote:
BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.hibernate.tool.hbm2x.AbstractExporter.<init>(AbstractExporter.jav
a:25)
at org.hibernate.tool.hbm2x.GenericExporter.<init>(GenericExporter.java:
77)
at org.hibernate.tool.hbm2x.POJOExporter.<init>(POJOExporter.java:28)
at org.hibernate.tool.ant.Hbm2JavaExporterTask.createExporter(Hbm2JavaEx
porterTask.java:41)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja
va:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
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:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


je comprends pas vraiment
j ai bien le hibernate tools dans mon classpath
est ce que qu un peut m aider svp merci d avance


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.