ok, I'll do it but while I confirm the strange behaviour I reported above now I get the same error from schemaexport with an xml mapping file done by hand that (for the list part) is like this:
Code:
<list name="addresses" table="person_address" lazy="false" cascade="all">
<key column="person_id"/>
<one-to-many class="Address"/>
<list-index column="address_index"/>
</list>
This is the dump of ant output (same error as above!)...
Code:
[propertyfile] Creating new property file: C:\Documents and Settings\[...]database.properties
[schemaexport] (cfg.Environment 464 ) Hibernate 3.0.5
[schemaexport] (cfg.Environment 477 ) hibernate.properties not found
[schemaexport] (cfg.Environment 510 ) using CGLIB reflection optimizer
[schemaexport] (cfg.Environment 540 ) using JDK 1.4 java.sql.Timestamp handling
[schemaexport] (cfg.Configuration 223 ) Mapping file: C:\Documents and Settings\[...]\Person.hbm.xml
[schemaexport] (util.XMLHelper 59 ) Error parsing XML: C:\Documents and Settings\[...]\Person.hbm.xml(90) The content of element type "list" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".
[schemaexport] (cfg.Configuration 232 ) Could not configure datastore from file: C:\Documents and Settings\[...]\Person.hbm.xml
[schemaexport] org.hibernate.MappingException: invalid mapping
[schemaexport] at org.hibernate.cfg.Configuration.addFile(Configuration.java:227)
[schemaexport] at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:195)
[schemaexport] at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:135)
[schemaexport] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[schemaexport] at org.apache.tools.ant.Task.perform(Task.java:364)
[schemaexport] at org.apache.tools.ant.Target.execute(Target.java:341)
[schemaexport] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[schemaexport] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[schemaexport] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[schemaexport] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[schemaexport] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[schemaexport] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[schemaexport] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[schemaexport] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[schemaexport] Caused by: org.xml.sax.SAXParseException: The content of element type "list" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".
[schemaexport] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
[schemaexport] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
[schemaexport] at org.dom4j.io.SAXReader.read(SAXReader.java:465)
[schemaexport] at org.dom4j.io.SAXReader.read(SAXReader.java:264)
[schemaexport] at org.hibernate.cfg.Configuration.addFile(Configuration.java:226)
[schemaexport] ... 13 more