-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem with hibernatetool path
PostPosted: Mon Aug 17, 2009 12:47 am 
Newbie

Joined: Mon Aug 17, 2009 12:34 am
Posts: 1
Hi, i have a problem with my path on org.hibernate.tool.ant.HibernateToolTask,
Here are the Exception and config files.

[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] javax.persistence.PersistenceException: [PersistenceUnit: junit] Unable to configure EntityManagerFactory
[hibernatetool] org.hibernate.AnnotationException: No identifier specified for entity: org.dbsoft.modelo.Usuario
[ant] Exiting /home/diego/workspace/OpenXava/build.xml.

BUILD FAILED
/home/diego/workspace/Sas/build.xml:38: The following error occurred while executing this line:
/home/diego/workspace/OpenXava/build.xml:982: Problems in creating a configuration for JPA. Have you remembered to add hibernate EntityManager jars to the classpath ?

######################################

<target name="defineHibernateTool">
<path id="jpatoolslib">
<path location="../OpenXava/lib/hibernate-tools.jar" />
<path location="../OpenXava/lib/freemarker.jar" />
<path location="../OpenXava/lib/commons-logging.jar" />
<path location="../OpenXava/lib/hibernate-entitymanager.jar" />
<path location="../OpenXava/lib/ejb3-persistence.jar" />
<path location="../OpenXava/lib/javaassist.jar" />
<path location="${jdbc.driver.jar}" />

<!-- Library from OpenXava in order to work the first time
before WEB-INF/lib of new project is populated -->
<fileset dir="../OpenXava/web/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
<!-- Library of project to include custom libraries -->
<fileset dir="../${project}/web/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
<path location="../OpenXava/bin" />
<path location="${schema.path}" />
</path>

<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="jpatoolslib" />
</target>

I feel like I had googled the whole internet without finding what I want. please help me out.


Top
 Profile  
 
 Post subject: Re: Problem with hibernatetool path
PostPosted: Mon Aug 17, 2009 9:30 am 
Newbie

Joined: Sat Aug 15, 2009 10:45 am
Posts: 4
This is not a problem with your classpath.

[hibernatetool] org.hibernate.AnnotationException: No identifier specified for entity: org.dbsoft.modelo.Usuario

Make sure you add the @Id annotation to your primary key field.


Top
 Profile  
 
 Post subject: Re: Problem with hibernatetool path
PostPosted: Fri Dec 04, 2009 12:54 pm 
Beginner
Beginner

Joined: Fri Dec 04, 2009 9:37 am
Posts: 34
ups , I have posted in wrong thread..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.