关于org.springframework.core.NestedIOException: Failed to parse mapping resource Caused by: org.xml.sa...

org.springframework.core.NestedIOException: Failed to parse mapping resource: 'D:\gitWorkspace\cuba\src\main\webapp\WEB-INF\classes\mappings\modules\monitor\ERoadTransportOrderDao.xml'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 595; columnNumber: 10; The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+".
at org.mybatis.spring.SqlSessionFactoryBean.refresh(SqlSessionFactoryBean.java:599)
at org.apache.ibatis.thread.Runnable.refresh(Runnable.java:152)
at org.apache.ibatis.thread.Runnable$1.run(Runnable.java:101)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 595; columnNumber: 10; The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+".
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:256)
at org.apache.ibatis.parsing.XPathParser.(XPathParser.java:125)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.(XMLMapperBuilder.java:86)
at org.mybatis.spring.SqlSessionFactoryBean.refresh(SqlSessionFactoryBean.java:594)
... 3 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 595; columnNumber: 10; The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+".
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.XMLDocumentFragmentScannerImpl.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.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:254)
... 6 more

Caused by: org.xml.sax.SAXParseException; lineNumber: 595; columnNumber: 10; The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+".

我的错误原因:在写注释时多打了一个尖括号 '>' ,以至于不符合标签规范,识别不出来。导致一直报如上错误。 如图:

关于org.springframework.core.NestedIOException: Failed to parse mapping resource Caused by: org.xml.sa..._第1张图片

 

 

如果还有出现以上问题,仔细检查即可。

 

转载于:https://www.cnblogs.com/Wulc-theworld/p/11532493.html

你可能感兴趣的:(java)