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
|
|