-->
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: SchemaExport : Java.Lang.NoClassDefFoundError (commandline)
PostPosted: Tue Jul 17, 2007 10:28 am 
Newbie

Joined: Tue Jul 17, 2007 9:52 am
Posts: 15
Hi,
i have some problems generating my databade DDL script from hibernate mapping files.

Here are the steps i had followed :

1- unzip hibernate release 3.2 in the folder
c:\hibernate-3.2

2- set hibernate.properties parameters
here is its content:
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.driver_class=org.postgresql.Driver
hibernate.connection.url=jdbc:postgresql:localhost:5432:ma_bd
hibernate.connection.username=mon_login
hibernate.connection.password=mon_pwd

3- add the environment variable CLASSPATH
with hibernate jar path and PostgresSQL 8.0

4- my mapping files
are located in the folderc:\hibernate-3.2\mon_mapping
(this folder contains several mapping files)

5-on command line, i typed the command :
c:\hinernate-3.2>java org.hibernate.tool.hbm2ddl.SchematExport --text --format --properties=etc\hibernate.properties --output=ma_ddl.txt etc/mon_mapping/*.hbm.xml

6 - then got the error message:
Exception in thread "main" Java.lang.noClassDefFoundError : org/hibernate/tool/hbm2ddl/SchemaExport

thanks for your help


Top
 Profile  
 
 Post subject: SchemaExport : problem Solve
PostPosted: Wed Jul 18, 2007 8:55 am 
Newbie

Joined: Tue Jul 17, 2007 9:52 am
Posts: 15
some jar files where missing in my CLASSPATH
this is ts content :
C:\hibernate-3.2\hibernate3.jar;c:\hibernate-3.2\lib\commons-logging-1.0.4.jar;c:\hibernate-3.2\lib\ehcache-1.2.3.jar;c:\hibernate-3.2\lib\cglib-2.1.3.jar;c:\hibernate-3.2\lib\jta.jar;c:\hibernate-3.2\lib\asm.jar;c:\hibernate-3.2\lib\antlr-2.7.6.jar;c:\hibernate-3.2\lib\jaxen-1.1-beta-7.jar;c:\program files\postgresql\8.0\jdbc\postgresql-8.0-310.jdbc3.jar;c:\hibernate-3.2\lib\commons-collections-2.1.1.jar;c:\hibernate-3.2\lib\dom4j-1.6.1.jar;c:\hibernate-3.2\lib\log4j-1.4.11.jar;c:\hibernate-3.2\lib\asm-attrs.jar

It works now!


Top
 Profile  
 
 Post subject: Re: SchemaExport : problem Solve
PostPosted: Sat Jul 21, 2007 5:51 am 
Newbie

Joined: Fri Jul 20, 2007 6:02 pm
Posts: 12
chimene wrote:
some jar files where missing in my CLASSPATH

Check CLASSPATH always


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.