The Addition of the line
Code:
<property name="hbm2ddl">create</property>
causes this error:
05:13:02,725 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(18) The content of element type "property" must match "(meta*,(column|formula)*,type?)".
Exception in thread "main" org.hibernate.MappingException: Error reading resource: org/barenakedobjects/framework/model/Project.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:399)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1263)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1235)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1217)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)
at org.barenakedobjects.framework.db.TestMyDB.<init>(TestMyDB.java:19)
at org.barenakedobjects.framework.db.TestMyDB.main(TestMyDB.java:39)
Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:346)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:396)
... 8 more
Caused by: org.xml.sax.SAXParseException: The content of element type "property" must match "(meta*,(column|formula)*,type?)".
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)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:334)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:345)
Code:
Code: