Caused by: org.xml.sax.SAXParseException; lineNumber: 4; col

2019-10-09 作者:计算机教程   |   浏览(199)

Caused by: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 49; 前言中不允许有内容。,

今天刚开始学习mybatis时,自己去尝试使用mybatis链接数据库,操作数据局时,报了一个下面的错误

Caused by: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 49; 前言中不允许有内容。
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:994)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:257)
... 5 more

 

很奇怪,我看了一遍又一遍,就是没有发现哪里出错了,后来查过资料之后,资料上说是在dtb约束上有多余的字符,,后来又去检查一遍果然,然后将多余的字符删除掉就可以了

http://www.bkjia.com/Javabc/1232125.htmlwww.bkjia.comtruehttp://www.bkjia.com/Javabc/1232125.htmlTechArticleCaused by: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 49; 前言中不允许有内容。, 今天刚开始学习mybatis时,自己去尝试使用mybatis链接数据...

对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾。
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:

Error building SqlSession.

本文由www.2003.com发布于计算机教程,转载请注明出处:Caused by: org.xml.sax.SAXParseException; lineNumber: 4; col

关键词: