Exception in thread "main" java.lang.RuntimeException:Error occurred. Cause:com.ibatis.common.xml.NodeletException:Error parsing XML.
Cause:org.xml.sax.SAXParseException:The markup in the document preceding the root element must to be well-formed. At Com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse (sqlmapconfigparser.java:89) at Com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient (sqlmapclientbuilder.java:63) at Com.fgh.Test.main
(test.java:22) caused By:com.ibatis.common.xml.NodeletException:Error parsing XML.
Cause:org.xml.sax.SAXParseException:The markup in the document preceding the root element must to be well-formed. At Com.ibatis.common.xml.NodeletParser.parse (nodeletparser.java:53) at Com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse (sqlmapconfigparser.java:86) ... 2 more caused By:org.xml.sax.SAXParseException:The markup in the document preceding the root element must be well-formed
. At Com.sun.org.apache.xerces.internal.util.ErRorhandlerwrapper.createsaxparseexception (errorhandlerwrapper.java:236) at Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError (errorhandlerwrapper.java:215) at Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:386) at Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:316) at Com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError (xmlscanner.java:1438) at Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdispatcher.dispatch ( xmldocumentscannerimpl.java:815) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument ( xmldocumentfragmentscannerimpl.java:368) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( xml11configuration.java:834) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( xml11configuration.java:764) at Com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (xmlparser. java:148) at Com.sun.org.apache.xerces.internal.parsers.DOMParser.parse (domparser.java:250) at Com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse (documentbuilderimpl.java:292) at Com.ibatis.common.xml.NodeletParser.createDocument (nodeletparser.java:157) at Com.ibatis.common.xml.NodeletParser.parse (nodeletparser.java:50) ... 3 more
Error Reason:
<?xml version= "1.0" encoding= "UTF-8" in the configuration file?>
<! DOCTYPE Sqlmapconfig
Public "-//ibatis.com//dtd SQL Map Config 2.0//en"
"Http://www.ibatis.com/dtd/sql-map-config-2.dtd" >
<! DOCTYPE multiple spaces in the middle