-->
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: hbm2ddl classpath problem
PostPosted: Fri Apr 09, 2004 2:20 pm 
Newbie

Joined: Fri Apr 09, 2004 2:12 pm
Posts: 2
Hi I generated hbm.xml files with xDoclet in a directory called antOutput/bin
and I also compiled the java objects there

As I read in the posts before I have to set the classpath in the taskdef
so I did:
Code:
<taskdef name="schemaexport" classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask">
         <classpath path="antOutput/bin"/>
      </taskdef>


but then I get the following error:

Quote:
net.sf.hibernate.MappingException: persistent class [dataobjects.User] not found


This problem does not occur when I set the classpath explicit to this directory (antOutput/bin), before I call ant.

Has anyone a suggestion why this phenomenon occurs or how I should change my build.xml file?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 09, 2004 4:21 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
have you tried to see if using a absolute path solves your problem ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 09, 2004 4:34 pm 
Newbie

Joined: Fri Apr 09, 2004 2:12 pm
Posts: 2
max wrote:
have you tried to see if using a absolute path solves your problem ?


yes I also tried but it is not the solution of the problem.

Now I found out that the problem is that I have the hibernate2.jar in the classpath of ant and so it ignores the classpath in the taskdef. So how can I tell the schemaexport in which directory to look.
Is this really a bug or only a logical error on my side?


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.