-->
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.  [ 2 posts ] 
Author Message
 Post subject: Newbie question using hbm2ddl...
PostPosted: Mon Jun 20, 2005 11:27 am 
Newbie

Joined: Mon Jun 20, 2005 11:18 am
Posts: 6
Hibernate version: 3.0.2

I am a new user of Hibernate. I am trying to use hbm2ddl. I get the following error when I run this tool from ant:


C:\personal\courses\self-study\hibernate-example>ant -f selfstudy-build.xml schemaexport
Buildfile: selfstudy-build.xml

schemaexport:
[schemaexport] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[schemaexport] log4j:WARN Please initialize the log4j system properly.

BUILD FAILED
file:C:/personal/courses/self-study/hibernate-example/selfstudy-build.xml:31: Schema text failed: Could not configure datastore from file: C:\personal
\courses\self-study\hibernate-example\WEB-INF\classes\Cat.hbm.xml

Total time: 2 seconds


hibernate.properties:
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/jboss
hibernate.connection.username=jboss
hibernate.connection.password=jboss
hibernate.dialect=org.hibernate.dialect.MySQLDialect


Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.hibernate.examples.quickstart.Cat" table="CAT">
<!-- A 32 hex character is our surrogate key. It's automatically
generated by Hibernate with the UUID pattern. -->
<id name="id" type="string" unsaved-value="null" >
<column name="CAT_ID" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<!-- A cat has to have a name, but it shouldn' be too long. -->
<property name="name">
<column name="NAME" length="16" not-null="true"/>
</property>
<property name="sex"/>
<property name="weight"/>
</class>
</hibernate-mapping>




Full stack trace of any exception that occurs:



Name and version of the database you are using: MySQL 5.0

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Any help is appreciated.


Thanks

-- pady


Top
 Profile  
 
 Post subject: Found the issue...
PostPosted: Mon Jun 20, 2005 11:45 am 
Newbie

Joined: Mon Jun 20, 2005 11:18 am
Posts: 6
It was a trivial class name error.

Thanks

-- pady


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