-->
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: EnversHibernateToolTask - Problems in creating a cfg
PostPosted: Thu May 19, 2011 8:01 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 3:54 am
Posts: 28
Hi,

I'm trying to use the EnversHibernateToolTask plugin, but I'm always getting the following error message: "Problems in creating a configuration for JPA. Have you remembered to add hibernate EntityManager jars to the classpath". I'm pretty sure that the Hibernate EntityManager jars are included in the classpath.

Could someone please help me with this issue ?

Regards, Stefan Lecho.

Code:
<project default="schemaexport">
   <target name="schemaexport"
         description="Exports a generated schema to DB and file">
   <taskdef name="hibernatetool"
      classname="org.hibernate.tool.ant.EnversHibernateToolTask"
            classpath=".;c:\Users\manager\.m2\repository\org\jboss\envers\jboss-envers\1.2.3-hibernate-3.3\jboss-envers-1.2.3-hibernate-3.3.jar;c:\Users\manager\.m2\repository\org\hibernate\hibernate-tools\3.2.3.GA\hibernate-tools-3.2.3.GA.jar;c:\Users\manager\.m2\repository\org\hibernate\hibernate\3.2.6.ga\hibernate-3.2.3.ga.jar;c:\Users\manager\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;c:\Users\manager\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;c:\Users\manager\.m2\repository\org\hibernate\hibernate-core\3.3.2.GA\hibernate-core-3.3.2.GA.jar;c:\Users\manager\.m2\repository\org\slf4j\slf4j-api\1.5.8\slf4j-api-1.5.8.jar;c:\Users\manager\.m2\repository\org\slf4j\slf4j-log4j12\1.5.6\slf4j-log4j12-1.5.6.jar;c:\Users\manager\.m2\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar" />
   <!--classpathref="${schema.classpath}"/>-->
   <hibernatetool destdir=".">
      <classpath>
         <!--fileset refid="lib.hibernate" /-->
         <!--path location="${build.dir}" /-->
                 <fileset dir="c:/Users/manager/.m2/repository">
                      <include name="**/*.jar"/>
            </fileset>
      </classpath>
   <jpaconfiguration persistenceunit="btwentiteit"/>
   <hbm2ddl
      drop="false"
      create="true"
      export="false"
      outputfilename="versioning-ddl.sql"
      delimiter=";"
      format="true"/>
   </hibernatetool>
   </target>
</project>


Code:
c:\projects\FODFin\STIRON\L2-M1\BTWEntiteit\trunk\BTWEntiteit>ant
Buildfile: c:\projects\FODFin\STIRON\L2-M1\BTWEntiteit\trunk\BTWEntiteit\build.xml

schemaexport:
[hibernatetool] Executing Hibernate Tool with a JPA Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] Problems in creating a configuration for JPA. Have you remembered to add hibernate EntityManager jars to the classpath ?
[hibernatetool] java.lang.reflect.InvocationTargetException
[hibernatetool] java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lj
ava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/
Map;Ljava/util/Map;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)V from class org.hibernate.cfg.ExtendedMappings

BUILD FAILED
c:\projects\FODFin\STIRON\L2-M1\BTWEntiteit\trunk\BTWEntiteit\build.xml:8: Problems in creating a configuration for JPA. Have you remembered to add hi
bernate EntityManager jars to the classpath ?

Total time: 2 seconds


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.