org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in mappers/user.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'mappers/user.xml'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ''. Cause: java.lang.ClassNotFoundException: Cannot find class:
This error occurs in the mybatis test for many reasons,
1: it may be the header information error of the mapping file. Correct:
2: there may also be an error in the label of the mapping file. Most of the errors reported in the mapping file are code errors. Just check the code
3: I made an error today because I wrote an extra tag, but the content in the tag was not written
4: The same type of error I encountered yesterday is because I wrote a comment in the where tag
<select>
<where>
Write comment here. This error has been encountered twice, as soon as a comment is written inside a tag, an error is reported
</where>
</select>
These are the mistakes and solutions I met in learning mybatis.
Read More:
- [Solved] Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException
- [Solved] Mybatis add dependencies Error: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
- [Solved] nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method
- [Solved] Mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
- 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] org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession…
- Mybatis query error: Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException…
- [Solved] org.apache.ibatis.executor.ExecutorException: No constructor found in void matching [java.lang.String]
- [Solved] ssm Error: Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: Executor was closed
- How to Solve Error: Error parsing mapper XML
- [Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred
- [Solved] ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed t
- [Solved] org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject…
- Mybatis plus configuration console prints complete SQL statement with parameters
- JAVA Error: package org.apache.commons.codec.binary does not exist
- [Solved] Java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
- [Solved] java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
- [Solved] SpringMVC Shiro Error: org.apache.shiro.UnavailableSecurityManagerException No SecurityManager
- [Solved] JSP tag forwarding forword error: org.apache.jasper.JasperException