【发布时间】:2011-10-25 09:05:19
【问题描述】:
我有以下hibernate xml映射文件段。
它产生了以下异常,为什么?它确实有提到的元素。
引起:org.xml.sax.SAXParseException:元素类型“list”的内容必须匹配“(meta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element |一对多|多对多|复合元素|多对任意),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter *)”。 在 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(未知来源) 在 org.apache.xerces.util.ErrorHandlerWrapper.error(未知来源) 在 org.apache.xerces.impl.XMLErrorReporter.reportError(未知来源) 在 org.apache.xerces.impl.XMLErrorReporter.reportError(未知来源) 在 org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(未知来源) 在 org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(未知来源) 在 org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(未知来源) 在 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(未知来源) 在 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(未知来源) 在 org.apache.xerces.parsers.XML11Configuration.parse(未知来源) 在 org.apache.xerces.parsers.XML11Configuration.parse(未知来源) 在 org.apache.xerces.parsers.XMLParser.parse(未知来源) 在 org.apache.xerces.parsers.AbstractSAXParser.parse(未知来源) 在 org.dom4j.io.SAXReader.read(SAXReader.java:465) 在 org.hibernate.cfg.Configuratio【问题讨论】: