-->
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.  [ 6 posts ] 
Author Message
 Post subject: I've got some problem with Hiibernate :(
PostPosted: Tue Mar 30, 2004 5:25 am 
Newbie

Joined: Tue Mar 30, 2004 5:02 am
Posts: 3
Location: Bangkok, Thailand
I've some problem about code genarator and schema.

1.first step : I set all possible path of the jar file by using this command.

2.second step : I try to execute this command java net.sf.hibernate.tool.hbm2java.CodeGenerator event.hbm.xml in order to generate java file for me but in this step it got some warning like this

log4j:WARN No appenders could be found for logger (net.sf.hibernate.util.DTDEntityResolver).
log4j:WARN Please initialize the log4j system properly.

However, it still can generate some file for me.

3.third step : In this step, I compile the java file that generate from the second step and I got some class file as a result.

4.forth step : In the forth step, I've got the problem. I try to using this command java -cp classpath net.sf.hibernate.tool.hbm2ddl.SchemaExport event.hbm.xml in order to export schema for me. This step can't export schema for me and it shown the exception error like this

Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/hibernate/tool/hbm2ddl/SchemaExport

Anyone used to have experience about this problem.
Please Help ! Thank you a lot :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 30, 2004 5:23 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
This has been answered elsewhere in the forum - please search first before asking questions.

The SchemaExport class is in the hibernate2.jar, so you need to include that in the classpath. Also the class you compiled needs to be on the classpath as well.


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 30, 2004 10:29 pm 
Newbie

Joined: Tue Mar 30, 2004 5:02 am
Posts: 3
Location: Bangkok, Thailand
I'm already try to include that lib on my path. But it's still got the problem :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 30, 2004 11:14 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
I'm sorry. An error like:

Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/hibernate/tool/hbm2ddl/SchemaExport


means that you do not have hibernate2.jar in your classpath. Please check it again.


What version of Hibernate are you using?


Shermaan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2004 12:32 am 
Newbie

Joined: Tue Mar 30, 2004 5:02 am
Posts: 3
Location: Bangkok, Thailand
I'm using Hibernate Version 2.1 Final .


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2004 1:46 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
http://prdownloads.sourceforge.net/hibe ... -2.0.2.zip


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