mybatis oracle 报java.sql.SQLException: 无效的列索引

Java (3) 2024-08-29 08:12

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
mybatis oracle 报java.sql.SQLException: 无效的列索引,希望能够帮助你!!!。

mybatis oracle 报java.sql.SQLException: 无效的列索引

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='item_name_hosp', mode=IN, javaType=class java.lang.Object, jdbcType=VARCHAR, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}.

Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType VARCHAR . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType VARCHAR . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: 无效的列索引] with root cause

java.sql.SQLException: 无效的列索引

mybatis oracle 报java.sql.SQLException: 无效的列索引_https://bianchenghao6.com/blog_Java_第1张

解决方法,删除上图红框中的内容,如下图,问题解决,因为虽然注释了,但#{item_name_hosp,jdbcType=VARCHAR}还是要解析

mybatis oracle 报java.sql.SQLException: 无效的列索引_https://bianchenghao6.com/blog_Java_第2张

2023-2-3

今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。

发表回复