I get the same exception while trying to build a SessionFactory. Here are my mapping files. I'm using Oracle. BTW on hsqldb it works fine.
------------------reservation.hbm.xml------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="airline.hibernate.Reservation"
table="RESERVATIONS"
>
<meta attribute="implements">net.sf.hibernate.Validatable</meta>
<composite-id name="comp_id" class="airline.hibernate.ReservationPK">
<key-property name="reservationId" column="RESERVATION_ID" type="int"/>
<key-property name="personId" column="PERSON_ID" type="int"/>
<key-property name="flightId" column="FLIGHT_ID" type="int"/>
</composite-id>
<property
name="registrationUtc"
type="java.sql.Timestamp"
column="REGISTRATION_UTC"
not-null="true"
length="7"
/>
<property
name="commentary"
type="java.lang.String"
column="COMMENTARY"
length="200"
/>
<!-- associations -->
<!-- bi-directional many-to-one association to Person -->
<many-to-one
name="person"
class="airline.hibernate.Person"
not-null="true"
insert="false"
update="false"
>
<column name="PERSON_ID" />
</many-to-one>
<!-- bi-directional many-to-one association to Flight -->
<many-to-one
name="flight"
class="airline.hibernate.Flight"
not-null="true"
insert="false"
update="false"
>
<column name="FLIGHT_ID" />
</many-to-one>
</class>
</hibernate-mapping>
-----------------------------person.hbm.xml-----------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="airline.hibernate.Person"
table="PERSONS"
schema="cmsd"
>
<meta attribute="implements">net.sf.hibernate.Validatable</meta>
<id
name="personId"
type="int"
column="PERSON_ID"
>
<generator class="sequence">
<param name="sequence"></param>
</generator>
</id>
<property
name="firstName"
type="java.lang.String"
column="FIRST_NAME"
not-null="true"
length="32"
/>
<property
name="lastName"
type="java.lang.String"
column="LAST_NAME"
not-null="true"
length="32"
/>
<property
name="description"
type="java.lang.Object"
column="DESCRIPTION"
length="4000"
/>
<!-- associations -->
<!-- bi-directional one-to-many association to Reservation -->
<set
name="reservations"
lazy="true"
inverse="true"
>
<key>
<column name="PERSON_ID" />
</key>
<one-to-many
class="airline.hibernate.Reservation"
/>
</set>
</class>
</hibernate-mapping>
-----------------------------flight.hbm.xml-----------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="airline.hibernate.Flight"
table="FLIGHTS"
schema="cmsd"
>
<meta attribute="implements">net.sf.hibernate.Validatable</meta>
<id
name="flightId"
type="int"
column="FLIGHT_ID"
>
<generator class="sequence">
<param name="sequence"></param>
</generator>
</id>
<property
name="name"
type="java.lang.String"
column="NAME"
not-null="true"
length="32"
/>
<property
name="departureUtc"
type="java.sql.Timestamp"
column="DEPARTURE_UTC"
not-null="true"
length="7"
/>
<property
name="arrivalUtc"
type="java.sql.Timestamp"
column="ARRIVAL_UTC"
not-null="true"
length="7"
/>
<!-- associations -->
<!-- bi-directional one-to-many association to Reservation -->
<set
name="reservations"
lazy="true"
inverse="true"
>
<key>
<column name="FLIGHT_ID" />
</key>
<one-to-many
class="airline.hibernate.Reservation"
/>
</set>
</class>
</hibernate-mapping>
-----------------------------------------------------------------------------
Somebody, please let me know what's wrong.
Thanks