JDBC getParameterType call failed - using fallback method instead
更多日志
[main] TRACE o.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 4, parameter value [null], value class [null], SQL type unknown[main] DEBUG o.springframework.jdbc.core.StatementCreatorUtils - JDBC getParameterTypecall failed - using fallback method instead: java.sql.SQLException: Parameter metadata notavailable for the given statement
有用过jdbctemplate 工具操作过数据库的道友,估计或多或少都见过这个日志,单看打印的日志,很明显是因为在我们执行insert或update语句时某些字段的值为null了,且没有特别配置jdbc的对应properties属性,以至于jdbc底层又想处理你的值而又不知道你的值类型;
细心的道友会发现这是debug级别的日志,但如果一次操作的字段比较多是会引起会话的游标数量不够用且报异常的(这个我会在下次文章中介绍)。
这里粘贴一下上述打印日志的底层方法:
org.springframework.jdbc.core.StatementCreatorUtils#setNull
解决方案
新建一个配置文件(若没有),且必须命名为 spring.properties,文件中加入如下配置:
spring.jdbc.getParameterType.ignore=true
至此即可解决上述问题,当然还可有其他解决方式,下回介绍。
JDBC getParameterType call failed - using fallback method instead相关推荐
- Failed to issue method call: Unit httpd.service failed to load: No such file or directory.
centos7修改httpd.service后运行systemctl restart httpd.service提示 Failed to issue method call: Unit httpd.s ...
- Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式...
Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式 作者:ch ...
- Failed to issue method call Unit mysql service failed to lo
Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解决办法 作者:ch ...
- 关于 hystrix 的异常 fallback method wasn‘t found
关于 hystrix 的异常 fallback method wasn't found 参考文章: (1)关于 hystrix 的异常 fallback method wasn't found (2) ...
- springcloud gateway断路器抛的错default failed and fallback disabled
有没有springcloud的大神碰到这个问题? 这是springcloud gateway断路器抛的错 default failed and fallback disabled., httpStat ...
- 关于 hystrix 的异常 fallback method wasn't found
在 Spring Cloud 中使用断路器 hystrix 后,可能会遇到异常:com.netflix.hystrix.contrib.javanica.exception.FallbackDefin ...
- HTTP Status 500 - Could not open Hibernate Session for transaction; JDBC begin transaction failed
最近这几天写了一个可以后台查看洗衣机消费数据的简单系统,前端是用的easyUI,后台用的ssh框架. 数据库用的是mysql. 我在本地项目没问题,但是当放到服务器上的tomcat后,早晨上班访问了一 ...
- tomcat 启动报错 registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister
在帮朋友改bug时出现下面错误: org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web applic ...
- Error Could not open client transport with JDBC Uri jdbchive2hadoop10210000 Failed to open new sessi
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop102:10000: Failed to open n ...
最新文章
- linux objdump 反汇编命令
- 在mac上命令行里面如何打开文本编辑器?
- mysql用户权限管理和增删改查操作
- hibernate annotation注解 columnDefinition用法
- java中集合的排序
- RxJs 操作符 withLatestFrom 在 SAP 电商云 Spartacus UI 中的应用
- linux精简、备份还原、iso文件、批量安装?
- python pyecharts 折线图_python数据大屏pyecharts库2020.8.31
- shell 做加法运算_使用shell脚本实现加法乘法运算
- 大号字代码php,如何用QQ发超大汉字_php
- applicationstatewinec7 电源管理
- 软件测试面试题(含答案)
- iOS9.3.3骚扰电话拦截黑名单数据库
- 如何编写项目发布文档
- 结构变量输入不正确的顺序可能会导致不正确的操作结果
- NDP调查:P2P下载的视频中60%为情色内容
- 谷歌项目经理都是怎么玩OKR的?我只告诉你
- 某笔试的一道简单题目
- SSH整合,非常详细的SSH整合
- 在Outlook2007中设置QQ邮箱为IMAP/SMTP服务器