添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

1 No enum constant org.apache.ibatis.type.JdbcType.category

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [/classes/mapper/WsTableDictItemMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [/classes/mapper/WsTableDictItemMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.category
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:612) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:490) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:632) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:180) ~[mybatis-spring-boot-autoconfigure-2.1.3.jar:2.1.3]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$a9c109ba.CGLIB$sqlSessionFactory$2(<generated>) ~[mybatis-spring-boot-autoconfigure-2.1.3.jar:2.1.3]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$a9c109ba$$FastClassBySpringCGLIB$$9e39615c.invoke(<generated>) ~[mybatis-spring-boot-autoconfigure-2.1.3.jar:2.1.3]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.2.jar:5.3.2]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.2.jar:5.3.2]
at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$a9c109ba.sqlSessionFactory(<generated>) ~[mybatis-spring-boot-autoconfigure-2.1.3.jar:2.1.3]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.2.jar:5.3.2]
... 45 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [/classes/mapper/WsTableDictItemMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.category
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:123) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:95) ~[mybatis-3.5.5.jar:3.5.5]
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:610) ~[mybatis-spring-2.0.5.jar:2.0.5]
... 58 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.category
at org.apache.ibatis.builder.BaseBuilder.resolveJdbcType(BaseBuilder.java:73) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildResultMappingFromContext(XMLMapperBuilder.java:392) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:280) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:254) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:246) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:119) ~[mybatis-3.5.5.jar:3.5.5]
... 60 common frames omitted
Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.category
at java.lang.Enum.valueOf(Enum.java:238) ~[na:1.8.0_191]
at org.apache.ibatis.type.JdbcType.valueOf(JdbcType.java:25) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.builder.BaseBuilder.resolveJdbcType(BaseBuilder.java:71) ~[mybatis-3.5.5.jar:3.5.5]
... 65 common frames omitted

错误原因:mybatis的jdbc类型配置错误或者类型配置错误

 <result column="category" jdbcType="category" property="category" />

2 org.apache.ibatis.ognl.ParseException: Encountered ” “!=” “!= “”

exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'wsTableDictItem.!=null and wsTableDictItem.category!='''. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: wsTableDictItem.!=null and wsTableDictItem.category!='' [org.apache.ibatis.ognl.ParseException: Encountered " "!=" "!= "" at line 1, column 17.
Was expecting one of:
"(" ...
"{" ...
<IDENT> ...
]] with root cause
org.apache.ibatis.ognl.ParseException: Encountered " "!=" "!= "" at line 1, column 17.
Was expecting one of:
"(" ...
"{" ...
<IDENT> ...
at org.apache.ibatis.ognl.OgnlParser.generateParseException(OgnlParser.java:3232) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.jj_consume_token(OgnlParser.java:3098) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.navigationChain(OgnlParser.java:1305) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.unaryExpression(OgnlParser.java:1199) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:974) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.additiveExpression(OgnlParser.java:897) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.shiftExpression(OgnlParser.java:753) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.relationalExpression(OgnlParser.java:511) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.equalityExpression(OgnlParser.java:408) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.andExpression(OgnlParser.java:355) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:302) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:249) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.logicalAndExpression(OgnlParser.java:196) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.logicalOrExpression(OgnlParser.java:143) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:104) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.assignmentExpression(OgnlParser.java:67) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.expression(OgnlParser.java:26) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.OgnlParser.topLevelExpression(OgnlParser.java:18) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.ognl.Ognl.parseExpression(Ognl.java:177) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.scripting.xmltags.OgnlCache.parseExpression(OgnlCache.java:55) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.scripting.xm

错误原因:test表达式属性遗漏。

 <if test="testDictItem.!=null and testDictItem.category!=''">
and t1.`category` = #{testDictItem.category,jdbcType=VARCHAR}

3 org.apache.ibatis.binding.BindingException: Parameter ‘envType’ not found. Available parameters

is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: 
Parameter 'envType' not found. Available parameters are [dictTypeCode, param3, param4, param1, tableName, param2, columnName]] with root cause
org.apache.ibatis.binding.BindingException: Parameter 'envType' not found. Available parameters are 
[dictTypeCode, param3, param4, param1, tableName, param2, columnName]
at org.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.java:212) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.reflection.wrapper.MapWrapper.get(MapWrapper.java:45) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:122) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:79) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:94) ~[mybatis-3.5.5.jar:3.5.5]
at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:64) ~[mybatis-3.5.5.jar:3.5.5]

错误原因:@Param(“tableName”) String envType, Param 填写错误,应当改为envType。和xml中对应

void deleteNameColumnTypeCode(@Param("tableName") String envType, @Param("tableName") String tableName,
@Param("columnName") String columnName, @Param("dictTypeCode") String dictTypeCode);