hibernate的移值问题?

03-09-09 ww2003
在hibernate 1.2下的简单例子,移值到2.0下出现异常:
ERROR] XMLHelper - -Error parsing XML: Schema.hbm.xml(7) <org.xml.sax.SAXParseException: The content of element type "key" must match "(column)*".>org.xml.sax.SAXParseException: The content of element type "key" must match "(column)*".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)


map xml文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<set name="seconds" table="seconds">
<key column="id">
<generator class="uuid.hex"/>
</key>
<composite-id class="com.hibernate.FooSecond">
<key-property name="firstName"/>
<key-property name="lastName"/>
</composite-id>
</set>

<class name="com.hibernate.Foo" table="foo">
<id name="id" column="id" type="int">
<generator class="assigned"/>
</id>
<collection name="seconds" column="seconds_id" table="seconds"/>
</class>
</hibernate-mapping>

是怎么回事啊?