Following the steps to generate the mapping to the BONUS table, I get a similar error to an earlier posting (12/12/04, “Hibernate Tutorial Question – SQL String?”). This is connecting to an Oracle db:
“The content of element type “class” must match … line 17″
and
“The serializable class Bonus does not declare a static final serialVersionUID field of type long …line 13″
I am using Eclipse 3.1.1, with the MyEclipse hibernate 4.0.1
The Bonus.hbm.xml:
<?xml version=”1.0” encoding=’UTF-8′?>
<!DOCTYPE hibernate-mapping PUBLIC
“-//Hibernate/Hibernate Mapping DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd” >
<!– DO NOT EDIT: This is a generated file that is synchronized –>
<!– by MyEclipse Hibernate tool integration. –>
<!– Created Sat Nov 19 17:29:22 PST 2005 –>
<hibernate-mapping package=”com.genuitec.hibernate”>
<class name=”Bonus” table=”BONUS”>
<property name=”ename” column=”ENAME” type=”string” />
<property name=”job” column=”JOB” type=”string” />
<property name=”sal” column=”SAL” type=”long” />
<property name=”comm” column=”COMM” type=”long” />
</class>
</hibernate-mapping>
How and where would I fix this?