Error Messages:
org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may exist in com/zcat/mybatis/mapper/UserMapper.xml ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.
Note that: The typeAliases in mybatis-config.xml are
is the package name of the entity class
mappers is the package name of the mapping file, so you need to check it carefully.
<?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>
<properties resource="jdbc.properties"></properties>
<typeAliases>
<package name="com.zcat.mybatis.pojo"/>
</typeAliases>
<environments default="development">
<environment id="development">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="${jdbc.driver}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</dataSource>
</environment>
</environments>
<mappers>
<package name="com.zcat.mybatis.mapper"/>
</mappers>
</configuration>
Check the creation of the mapping file. It is different from creating the package. Instead of clicking
, it is/XX/XX
Open in terminal check whether the directory structure generated during creation is correct
Read More:
- Mybatis query error: Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException…
- [Solved] Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration
- [Solved] Mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
- [Solved] Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException
- Mybatis reports an error (error building sqlsession.) when using annotations without deleting redundant files
- [Solved] org.apache.ibatis.executor.ExecutorException: No constructor found in void matching [java.lang.String]
- [Solved] nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method
- [Solved] Mybatis add dependencies Error: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
- Mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
- [Solved] mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
- [Solved] ssm Error: Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: Executor was closed
- [Solved] Error building SqlSession.The error may exist in XXXXXMapper/xml
- [Solved] ### Error building SqlSession. ### The error may exist in com/atguigu/dao/SysUserMapper.xml ### Caus
- [Solved] org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject…
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template
- [Solved] JSP tag forwarding forword error: org.apache.jasper.JasperException
- Springboot Project Error: Failed to execute goal org.apache.maven.plugins
- Maven (http://repo1.maven.org/maven2/): Failed to transfer file and PKIX path building failed: sun.secu
- JAVA Error: package org.apache.commons.codec.binary does not exist