I have been through all of the posts on this but still have not clue as to
how to resolve this.
The most frequent responce seems to be : "this is a DTD violation"
however I have created the Mapping file with a vlidating Editor
and it passes all standard it appears to validate against the DTD
just fine.
I have also tried re-ordering the classes but with no effect.
The offending mapping file bieng:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="rats.model.Product" table="product">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<many-to-one class="Manager" column="Manager" name="manager"/>
<property column="Name" length="127" name="name" type="string"/>
<property column="Code" length="10" name="code" type="string"/>
</class>
<class name="rats.model.Test" table="test">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<property column="Name" length="127" name="name" type="string"/>
<many-to-one class="Manager" column="Manager" name="manager"/>
<set name="products" table="TestProduct">
<key column="Test"/>
<many-to-many class="Product" column="Product"/>
</set>
</class>
<class name="rats.model.Manager" table="manager">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<property column="Name" length="127" name="name" type="string"/>
<set name="Products">
<key column="Manager"/>
<one-to-many class="Product"/>
</set>
<set name="tests">
<key column="Manager"/>
<one-to-many class="Test"/>
</set>
</class>
<class name="rats.model.Number" table="number">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<many-to-one class="Advisor" column="Advisor" name="advisor"/>
<many-to-one class="Manager" column="Manager" name="manager"/>
<property column="Number" length="50" name="number" type="string"/>
</class>
<class name="rats.model.Testattempt" table="testattempt">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<many-to-one class="Advisor" column="Advisor" name="advisor"/>
<many-to-one class="Test" column="Test" name="test"/>
<property column="Passed" length="1" name="passed" type="integer"/>
<property column="Date" length="19" name="date" type="timestamp"/>
</class>
<class name="rats.model.Advisor" table="advisor">
<id column="ID" name="id" type="long">
<generator class="sequence"/>
</id>
<property column="Code" length="8" name="code" type="string"/>
<property column="Name" length="127" name="name" type="string"/>
<set name="testattempts">
<key column="Advisor"/>
<one-to-many class="TestAttempt"/>
</set>
<set name="numbers">
<key column="Advisor"/>
<one-to-many class="Number"/>
</set>
</class>
</hibernate-mapping>