OK, so I figured out the logging and even some dialect issues. Now the task seems to work great!
Except...I get no output file and no table generated.
Here is the task:
Code:
<target name="createDB">
<ant antfile="build-persistence-jar.xml" target="jar"/>
<hibernateTool destdir="${ddl.dir}">
<classpath>
<fileset dir="${seam-hibernate.lib.dir}" includes="*.jar"/>
<fileset dir="${hibernate.tools.lib.dir}" />
<fileset dir="${oracle.lib.dir}" includes="*.jar"/>
<fileset dir="../dist" includes="*.jar"/>
</classpath>
<jpaconfiguration persistenceunit="srmStandalone"/>
<hbm2ddl export="true"
update="true"
outputfilename="srm.sql"
delimiter=";"
format="true"
haltonerror="true" destdir="${ddl.dir}"/>
</hibernateTool>
</target>
Here is the logging output:
Code:
Executing Hibernate Tool with a JPA Configuration
1. task: hbm2ddl (Generates database schema)
Oct 17, 2007 2:22:17 PM org.hibernate.ejb.Version <clinit>
INFO: Hibernate EntityManager 3.2.0.GA
Oct 17, 2007 2:22:17 PM org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.2.0.GA
Oct 17, 2007 2:22:17 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.1
Oct 17, 2007 2:22:17 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Oct 17, 2007 2:22:17 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Oct 17, 2007 2:22:17 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Oct 17, 2007 2:22:18 PM org.hibernate.cfg.annotations.QueryBinder bindQuery
INFO: Binding Named query: findUserByUsername => from User as user where user.username = :username
Oct 17, 2007 2:22:18 PM org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: gov.nist.srm.persistence.admin.User
Oct 17, 2007 2:22:18 PM org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity gov.nist.srm.persistence.admin.User on table APP_USER
Oct 17, 2007 2:22:18 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.Oracle9Dialect
Oct 17, 2007 2:22:18 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: Running hbm2ddl schema update
Oct 17, 2007 2:22:18 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: fetching database metadata
Oct 17, 2007 2:22:18 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Oct 17, 2007 2:22:18 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Oct 17, 2007 2:22:18 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: true
Oct 17, 2007 2:22:19 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@server:port:sid
Oct 17, 2007 2:22:19 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=USER, password=****, autocommit=true, release_mode=auto}
Oct 17, 2007 2:22:19 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: updating schema
Oct 17, 2007 2:22:20 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Oct 17, 2007 2:22:20 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Oct 17, 2007 2:22:20 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: true
Oct 17, 2007 2:22:20 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@sysdev.nist.gov:2001:sysdev
Oct 17, 2007 2:22:20 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=USER, password=****, autocommit=true, release_mode=auto}
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: Oracle JDBC driver, version: 11.1.0.6.0-Production
Oct 17, 2007 2:22:20 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.Oracle9Dialect
Oct 17, 2007 2:22:20 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
Oct 17, 2007 2:22:20 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Oct 17, 2007 2:22:20 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: enabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.NoCacheProvider
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Oct 17, 2007 2:22:20 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Oct 17, 2007 2:22:21 PM org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: table found: SRM_ADMIN.SRM_USER
Oct 17, 2007 2:22:21 PM org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: columns: [username, role, created_by_user_id, date_created, id, version]
Oct 17, 2007 2:22:21 PM org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: foreign keys: [fk28884b9cd4f2b429]
Oct 17, 2007 2:22:21 PM org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: indexes: [sys_c0045709]
Oct 17, 2007 2:22:21 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: schema update complete
Oct 17, 2007 2:22:21 PM org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool: jdbc:oracle:thin:@server:port:sid
Any ideas?
Thanks.