MyEclipse 10
When using MyEclipse to reverse engineer MYSql database to POJO’s, and generating the HBM mapping files, an extra space is created in the DTD definition. In teh DOCTYPE tag, the reference to hibernate-mapping-3.0.dtd should not have a trailing space.
This space has to be manually removed or the mapping will fail validation when Hiberate reads the mapping file.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd ">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="osiris.model.Product" table="Product" catalog="data">
<id name="id" type="java.lang.Integer">
<column name="ID" />
<generator class="assigned" />
</id>
<property name="name" type="java.lang.String">
<column name="Name" length="45" not-null="true" />
</property>
<property name="price" type="java.lang.Float">
<column name="Price" precision="12" scale="0" />
</property>
<set name="lineItems" inverse="true">
<key>
<column name="Item" />
</key>
<one-to-many class="osiris.model.LineItem" />
</set>
</class>
</hibernate-mapping>