-->
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.  [ 5 posts ] 
Author Message
 Post subject: SchemaExport Problem 252 ) Could not compile the mapping
PostPosted: Tue Jul 13, 2004 5:47 pm 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Good day,

I've been struggling with this problem for 2 days now and I am about to give up. I am getting this "Could not compile the mapping" error for any Hibernate mapping file, when I try to generate the DDL. The second error also shows hibernate.properties not found, however changes in this file affects the build, so it appears to be a false alarm.

Any help, will be great - Urgent.

(cfg.Environment 462 ) Hibernate 2.1.3
(cfg.Environment 491 ) hibernate.properties not found
(cfg.Environment 519 ) using CGLIB reflection optimizer
(cfg.Configuration 166 ) Mapping file: D:\nouveau\vhr\WEB-INF\lib\samples\target\gen-src\vhr\hibernate\Animal.hbm.xml
(cfg.Configuration 252 ) Could not compile the mapping document
net.sf.hibernate.MappingException: persistent class [vhr.hibernate.Animal] not found
at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:84)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:171)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:195)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:135)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 5:49 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Your persistent classes have to be in the classpath for schemaexport.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 5:58 pm 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Thanks for the prompt reply Christian,

I'm new to a couple of things (Ant, Hybernate and Netbeans)... can I set up the classpath in the Ant script or must it be a global classpath environment variable?

Forgive the irritation.

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 5:59 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It must be in the classpath of your schemaexport Ant target. There is a Toolset workshop on the Hibernate website, under Documentation "Online Documentation/Tutorials/Workshops".

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 6:04 pm 
Newbie

Joined: Tue Jul 13, 2004 5:38 pm
Posts: 10
Thanks!


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