Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:265)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:252)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:244)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:116)
... 104 more
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120)
at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)
... 108 more
Recently, during SSM integration, I encountered a bug of classnotfoundexception, which means that the result type corresponding to the return value cannot be found. Finally, I found that I wrote the type and ID inversely.
In addition, if the returned value is a basic data type, use resulttype. If it matches resultmap
, such as collection, map, etc., use resultmap. When facing Baidu debug, you will report similar errors when you see this situation
Read More:
- Error building SqlSession. ### Cause: org.apache.ibatis.builder.BuilderException: Error creating d
- org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/hujin
- Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
- Caused by: org.apache.catalina.LifecycleException: A child container failed during start
- org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may
- org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null
- “[warning] failed to retrieve plugin descriptor for caused by Maven security agent settings org.apache.maven . plugins:… “
- solve org.apache.ibatis . binding.BindingException : invalid bound statement (not found)
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- Remember a mybatis error org.apache.ibatis . session.defaults.DefaultSqlSession
- When I first learned mybatis org.apache.ibatis . binding.BindingException report errors
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.UserDao
- Tomcat9 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
- org.apache.jasper . jasperexception: unable to compile class for jsp: error resolution
- Error: Could not find or load main class org.apache.hadoop.hbase.util.HBaseConfTool
- NoClassDefFoundError: org/apache/flink/metrics/MetricGroup
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- org.apache.jasper.JasperException: Unsupported encoding:
- tomcat Issues org.apache.catalina.LifecycleException: Failed to start component
- org.apache.catalina.LifecycleException: Protocol handler start failed