-->
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: schemaexport doesn't create tables
PostPosted: Wed Nov 05, 2003 7:27 pm 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
Hi,

I'm a newbie. My schemaexport ant task seems to fail, although no error is reported.
The ant task is:
<target name="db-schema" depends="compile,hibernate">
<path id="hibernate.mapping.files" >
<fileset dir=".">
<include name="**/*.hbm.xml" />
</fileset>
</path>
<pathconvert refid="hibernate.mapping.files" property="hibernate.mappings" pathsep=" "/>
<java classname="net.sf.hibernate.tool.hbm2ddl.SchemaExport" fork="true">
<!-- mapping file -->
<arg line="${hibernate.mappings} --text --format --output=example_schema.ddl --delimiter=;"/>
<classpath>
<pathelement location="${properties.dir}"/>
<pathelement location="${build.dir}"/>
<fileset dir="${lib.hibernate}">
<include name="**/*.jar"/>
</fileset>

<fileset file="${database.driver}" />

<!-- build output path -->
<pathelement location="${dist}"/>
</classpath>
</java>
</target>

The ant output is:
[java] 6-nov-2003 0:26:21 net.sf.hibernate.cfg.Environment <clinit>
[java] INFO: Hibernate 2.0.3
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Environment <clinit>
[java] INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.use_outer_join=true, hibernate.connection.username=admin, hibernate.connection.url=jdbc:mysql://localhost:3306/executie?autoReconnect=true, jta.UserTransaction=java:comp/UserTransaction, hibernate.show_sql=false, hibernate.connection.password=, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory, hibernate.connection.pool_size=20, hibernate.statement_cache.size=6 }
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Environment <clinit>
[java] INFO: using CGLIB reflection optimizer
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Environment <clinit>
[java] INFO: JVM proxy support: true
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Configuration addFile
[java] INFO: Mapping file: D:\Projects\Java\executie\WEB-INF\classes\nl\executieverkoop\users\UserBean.hbm.xml
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Binder bindRootClass
[java] INFO: Mapping class: nl.executieverkoop.users.UserBean -> gebruikers
[java] 6-nov-2003 0:26:22 net.sf.hibernate.dialect.Dialect <init>
[java] INFO: Using dialect: net.sf.hibernate.dialect.MySQLDialect
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Configuration secondPassCompile
[java] INFO: processing one-to-many association mappings
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Configuration secondPassCompile
[java] INFO: processing foreign key constraints
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Configuration secondPassCompile
[java] INFO: processing one-to-many association mappings
[java] 6-nov-2003 0:26:22 net.sf.hibernate.cfg.Configuration secondPassCompile
[java] INFO: processing foreign key constraints
[java] drop table gebruikers;
[java] create table gebruikers (
[java] id INTEGER NOT NULL AUTO_INCREMENT,
[java] address VARCHAR(255),
[java] city VARCHAR(255),
[java] email VARCHAR(255),
[java] initials VARCHAR(255),
[java] lastName VARCHAR(255),
[java] password VARCHAR(255),
[java] postal VARCHAR(255),
[java] username VARCHAR(255),
[java] primary key (id)
[java] );
BUILD SUCCESSFUL

My hibernate.properties config is:
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/executie?autoReconnect=true
hibernate.connection.username=admin
hibernate.connection.password=xx
hibernate.connection.pool_size=20
hibernate.statement_cache.size=6
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.show_sql=false
hibernate.use_outer_join=true
hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory
jta.UserTransaction=java:comp/UserTransaction

No idea whatsoever anymore.

Any help's appreciated!

Kind regards,

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2003 7:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You are running it in text-only mode. Remove the --text.

Note that we -do- now have a proper Ant task for SchemaExport.


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.