### Error building SqlSession.

1、错误描述

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 93; 对实体 "characterEncoding" 的引用必须以 ‘;‘ 分隔符结尾。
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:79)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:63)
	at com.you.demo.Mybatis.main(Mybatis.java:45)
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 93; 对实体 "characterEncoding" 的引用必须以 ‘;‘ 分隔符结尾。
	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:253)
	at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:122)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:72)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:76)
	... 2 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 93; 对实体 "characterEncoding" 的引用必须以 ‘;‘ 分隔符结尾。
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
	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:441)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:890)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(XMLDocumentFragmentScannerImpl.java:1547)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1319)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	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:347)
	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:251)
	... 5 more

2、错误原因

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>
    <environments default="development">
        <transactionManager type="JDBC"/>
        <dataSource type="POOLED">
            <property name="driver"
                value="com.mysql.jdbc.Driver"/>
            <property name="url"
                value="***************"/>
            <property name="username" value="**************"/>
            <property name="password" value="*************"/>
        </dataSource>
    </environments>
</configuration>

3、解决办法

时间: 2024-11-02 23:38:25

### Error building SqlSession.的相关文章

Junit测试错误:### Error building SqlSession

错误代码: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession.### The error may exist in com/jkw100/mybatis/mapper/PatientMapper.xml### The error occurred while processing mapper_resultMap[BaseResultMap]### Cause: org.apache.

【Unity3D】生成工程报错解决—UnityEditor.HostView:OnGUI() Error building Player: Couldn&#39;t build player because of unsupported data on target platform.

错误 错误1:An asset is marked as dont save, but is included in the build: unityEditor.HostView:OnGUI() 错误2:Building - Failed to write file: sharedassets0.assetsUnityEditor.HostView:OnGUI() 错误3:Error building Player: Couldn't build player because of unsup

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the

问题: Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.C:\Program Files\Java\jdk1.7.0_45\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="D:/work/Android/android-sdk\tools&

Error building Player: Win32Exception: ApplicationName=&amp;#39;E:/adt-20140702/sdk\tools\zipalign.exe&amp;#39;, Com

1.原因 更新sdk后报错..由于版本号不同,zipalign.exe所处路径不同 2.解决的方法 在sdk路径下搜索zipalign.exe .然后拷贝到报错内容中制定的路径即可了. Error building Player: Win32Exception: ApplicationName='E:/adt-20140702/sdk\tools\zipalign.exe', Com

Error building Player: Win32Exception: ApplicationName=‘xxxxxxxxxxxxxxxxxx//sdk\tools\zipalign.exe&#39; , CommandLine=&#39;4 的解决办法

更新了安卓SDK后,有时候Unity编译失失败,报错类似 Error building Player: Win32Exception: ApplicationName='D:/Program Files/adt-bundle-windows-x86_64-20140702/sdk\tools\zipalign.exe', CommandLine='4 "XXXXX\Temp/StagingArea/Package_unaligned.apk" "XXXXX\Temp/Stag

Error building Player: Win32Exception: ApplicationName=&#39;E:/adt-20140702/sdk\tools\zipalign.exe&#39;, Com

1.原因 更新sdk后报错,,因为版本不同,zipalign.exe所处路径不同 2.解决办法 在sdk路径下搜索zipalign.exe .然后复制到报错内容中制定的路径就行了. Error building Player: Win32Exception: ApplicationName='E:/adt-20140702/sdk\tools\zipalign.exe', Com

【已解决】unity4.2.0f4 导出Android工程报错:Error building Player: ArgumentException: Illegal characters in path.

你看到的这个文章来自于http://www.cnblogs.com/ayanmw 使用unity3D开发的一个客户端,需要导出为Android工程,然后接入一些第三方android SDK. unity版本 操作系统为: OS 名称: Microsoft Windows 7 旗舰版 OS 版本: 6.1.7601 Service Pack 1 Build 7601 OS 制造商: Microsoft Corporation OS 配置: 独立工作站 OS 构件类型: Multiprocessor

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.D:\GameDevelopment\adt-bundle-windows-x86\build-tools\android-4.4W\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml

fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha

调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD