Ok, here is my .hbm.xml file, the contenst of the .cmd file I am running to generate the DDL and the output from that .cmd file. Where am I going wrong?
<?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>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="airline.hibernate.Reservation"
table="reservations"
>
<composite-id>
<key-property
name="reservationId"
column="reservation_id"
type="java.lang.Integer"
length="10"
/>
<key-property
name="personIdFk"
column="person_id_fk"
type="java.lang.Integer"
length="10"
/>
<key-property
name="flightIdFk"
column="flight_id_fk"
type="java.lang.Integer"
length="10"
/>
</composite-id>
<property
name="registrationUtc"
type="java.sql.Timestamp"
column="registration_utc"
not-null="true"
length="23"
/>
<property
name="comment"
type="java.lang.String"
column="comment"
length="2147483647"
/>
</class>
</hibernate-mapping>
@echo off
set CP="C:\hibernate-3.3.1\hibernate3.jar;C:\hibernate-3.3.1\lib\required\slf4j-1.5.6\slf4j-api-1.5.6.jar;C:\hibernate-3.3.1\lib\required\slf4j-1.5.6\slf4j-jdk14-1.5.6.jar;C:\hibernate-3.3.1\lib\required\dom4j-1.6.1.jar;C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.0\enu\sqljdbc.jar;C:\hibernate-3.3.1\lib\required\antlr-2.7.6.jar;C:\hibernate-3.3.1\lib\required\commons-collections-3.1.jar;C:\hibernate-3.3.1\lib\required\javassist-3.4.GA.jar;C:\hibernate-3.3.1\lib\required\jta-1.1.jar"
REM Set the Java classpath
set CLASSPATH=%CP%
java -cp %CLASSPATH% org.hibernate.tool.hbm2ddl.SchemaExport --properties=hibernate.properties --text --format --create Reservation3.hbm.xml
C:\hibernate-3.3.1>h_exportdb.cmd
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.3.1.GA
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : javassist
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.Configuration addFile
INFO: Reading mappings from file: Reservation3.hbm.xml
Mar 20, 2009 3:49:11 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: airline.hibernate.Reservation -> reservations
Mar 20, 2009 3:49:11 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.SQLServerDialect
Mar 20, 2009 3:49:11 PM org.hibernate.tool.hbm2ddl.SchemaExport main
SEVERE: Error creating schema
org.hibernate.MappingException: component class not found: airline.hibernate.Reservation at org.hibernate.mapping.Component.getComponentClass(Component.java:127)
at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:66)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:61)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.jav
a:76)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)
at org.hibernate.mapping.Component.buildType(Component.java:175)
at org.hibernate.mapping.Component.getType(Component.java:168)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:175)
at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:743)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:854)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:474)
Caused by: java.lang.ClassNotFoundException: airline.hibernate.Reservation
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
at org.hibernate.mapping.Component.getComponentClass(Component.java:124)
... 13 more
org.hibernate.MappingException: component class not found: airline.hibernate.Reservation
at org.hibernate.mapping.Component.getComponentClass(Component.java:127)
at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:66)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:61)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.jav
a:76)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)
at org.hibernate.mapping.Component.buildType(Component.java:175)
at org.hibernate.mapping.Component.getType(Component.java:168)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:175)
at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:743)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:854)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:474)
Caused by: java.lang.ClassNotFoundException: airline.hibernate.Reservation
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
at org.hibernate.mapping.Component.getComponentClass(Component.java:124)
... 13 more