I'm using Ant to take annotated source and generate (and export) a schema like so:
Code:
<hibernatetool destdir=".">
<annotationconfiguration
propertyfile="${hibernate.props.file}"
configurationfile="${hibernate.mapping.file}"/>
<hbm2ddl/>
</hibernatetool>
Where the props file looks like:
Code:
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.connection.url=jdbc:hsqldb:file:compileTimeDb
hibernate.connection.username=sa
hibernate.connection.password=
When do this against a server url, I see that the schema is properly exported and creates the tables in the server DB as I want.
I assume it's also generating properly when I specify that the DB be in "file" mode rather than "server" mode. But I can't find the DB file afterwards to inspect it.
All that's left are files relating to the DB file - not the DB file itself!Code:
compileTimeDb.lck
compileTimeDb.log
compileTimeDb.properties
compileTimeDb.script
Any ideas what's happening here?
Thanks!
Sean
By the way, here is what is shown in the console when running the <hibernatetool> task:
Code:
[hibernatetool] Executing Hibernate Tool with a Hibernate Annotation/EJB3 Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool] INFO 2006-09-28 15:45:31,664 C:annotations.Version T:main - Hibernate Annotations 3.2.0.CR2
[hibernatetool] INFO 2006-09-28 15:45:31,711 C:cfg.Environment T:main - Hibernate 3.2 cr4
[hibernatetool] INFO 2006-09-28 15:45:31,727 C:cfg.Environment T:main - hibernate.properties not found
[hibernatetool] INFO 2006-09-28 15:45:31,743 C:cfg.Environment T:main - Bytecode provider name : cglib
[hibernatetool] INFO 2006-09-28 15:45:31,743 C:cfg.Environment T:main - using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] INFO 2006-09-28 15:45:31,977 C:cfg.Configuration T:main - configuring from file: hibernate.cfg.xml
[hibernatetool] INFO 2006-09-28 15:45:32,430 C:cfg.Configuration T:main - Configured SessionFactory: null
[hibernatetool] INFO 2006-09-28 15:45:32,602 C:cfg.AnnotationBinder T:main - Binding entity from annotated class: com.pillardata.message.consim.BrickInfo
[hibernatetool] INFO 2006-09-28 15:45:32,711 C:annotations.EntityBinder T:main - Bind entity com.pillardata.message.consim.BrickInfo on table BrickInfo
[hibernatetool] INFO 2006-09-28 15:45:33,164 C:dialect.Dialect T:main - Using dialect: org.hibernate.dialect.HSQLDialect
[hibernatetool] INFO 2006-09-28 15:45:33,524 C:hbm2ddl.SchemaExport T:main - Running hbm2ddl schemaexport
[hibernatetool] INFO 2006-09-28 15:45:33,539 C:hbm2ddl.SchemaExport T:main - exporting generated schema to database
[hibernatetool] INFO 2006-09-28 15:45:33,539 C:connection.DriverManagerConnectionProvider T:main - Using Hibernate built-in connection pool (not for production use!)
[hibernatetool] INFO 2006-09-28 15:45:33,539 C:connection.DriverManagerConnectionProvider T:main - Hibernate connection pool size: 20
[hibernatetool] INFO 2006-09-28 15:45:33,539 C:connection.DriverManagerConnectionProvider T:main - autocommit mode: false
[hibernatetool] INFO 2006-09-28 15:45:33,555 C:connection.DriverManagerConnectionProvider T:main - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:compileTimeDb
[hibernatetool] INFO 2006-09-28 15:45:33,555 C:connection.DriverManagerConnectionProvider T:main - connection properties: {user=sa, password=****}
[hibernatetool] create table BrickInfo (BrickInfo_brickID bigint not null, HardwareResultCode_resultCode bigint, BrickInfo_maxArrays bigint, BrickEnclosure_physStatus integer, BrickEnclosure_opStatus integer, BrickSCSIEnclosureServices_physStatus integer, BrickSCSIEnclosureServices_opStatus integer, BrickSCSIEnclosureServices_serial varbinary(255), BrickSCSIEnclosureServices_version varbinary(255), BrickSCSIEnclosureServices_model varbinary(255), primary key (BrickInfo_brickID));
[hibernatetool] create table BrickInfo_array (BrickInfo_BrickInfo_brickID bigint not null, BrickArray_opStatus integer, BrickArray_cfgStatus integer, BrickArray_olFlags integer, BrickArray_arrayType integer, BrickArray_arrayID varbinary(255), BrickArray_lun numeric, BrickArray_capacity numeric, BrickInfo_array_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_array_index));
[hibernatetool] create table BrickInfo_disk (BrickInfo_BrickInfo_brickID bigint not null, BrickDisk_access integer, BrickDisk_physStatus integer, BrickDisk_opStatus integer, BrickDisk_capacity numeric, BrickDisk_serial varbinary(255), BrickDisk_blockSize bigint, BrickDisk_slot bigint, BrickDisk_version varbinary(255), BrickDisk_model varbinary(255), BrickInfo_disk_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_disk_index));
[hibernatetool] create table BrickInfo_fan (BrickInfo_BrickInfo_brickID bigint not null, BrickFan_physStatus integer, BrickFan_opStatus integer, BrickFan_version varbinary(255), BrickInfo_fan_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_fan_index));
[hibernatetool] create table BrickInfo_psu (BrickInfo_BrickInfo_brickID bigint not null, BrickPowerSupply_physStatus integer, BrickPowerSupply_opStatus integer, BrickPowerSupply_serial varbinary(255), BrickPowerSupply_version varbinary(255), BrickPowerSupply_model varbinary(255), BrickInfo_psu_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_psu_index));
[hibernatetool] create table BrickInfo_raidCtlr (BrickInfo_BrickInfo_brickID bigint not null, BrickRaidController_physStatus integer, BrickRaidController_opStatus integer, BrickInfo_raidCtlr_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_raidCtlr_index));
[hibernatetool] create table BrickInfo_temp (BrickInfo_BrickInfo_brickID bigint not null, BrickTemperature_physStatus integer, BrickTemperature_opStatus integer, BrickInfo_temp_index integer not null, primary key (BrickInfo_BrickInfo_brickID, BrickInfo_temp_index));
[hibernatetool] alter table BrickInfo_array add constraint FK21E9DE89C2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] alter table BrickInfo_disk add constraint FK95B5B6DC2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] alter table BrickInfo_fan add constraint FK7C2C4343C2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] alter table BrickInfo_psu add constraint FK7C2C6B02C2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] alter table BrickInfo_raidCtlr add constraint FKE2019231C2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] alter table BrickInfo_temp add constraint FK96291A4C2B5B746 foreign key (BrickInfo_BrickInfo_brickID) references BrickInfo;
[hibernatetool] INFO 2006-09-28 15:45:34,086 C:hbm2ddl.SchemaExport T:main - schema export complete
[hibernatetool] INFO 2006-09-28 15:45:34,133 C:connection.DriverManagerConnectionProvider T:main - cleaning up connection pool: jdbc:hsqldb:file:compileTimeDb