遇到错误Check the judgetypet-InlineParameterMap.

摘要:
怎么开启呢?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true

在tomcat的catalin.out 中遇到以下错误

以上的judgetypet为其中一个方法的id值

00:40:00,020 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Elapsed period: Mon Dec 24 14:30:00 CST 2018
00:40:00,021 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/opt/apache-tomcat-bg/logs/log.log] to [/opt/apache-tomcat-bg/logs/log2018-12-24.log]
00:40:00,021 |-INFO in c.q.l.core.rolling.helper.TimeBasedArchiveRemover -first clean up after appender initialization
00:40:00,022 |-INFO in c.q.l.core.rolling.helper.TimeBasedArchiveRemover - periodsElapsed = 64com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/unisk/timertask/dao/TimerTaskDao.xml.  
--- The error occurred whileapplying a parameter map.  
--- Check the judgetypet-InlineParameterMap.  
---Check the statement (query failed).  
--- Cause: com.mysql.jdbc.CommunicationsException: The last communications with the server was 7200 seconds ago, which  is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

在ibatis的mapper.xml中的sql语句结尾的分号删掉以后就好了

其实还有另一种解决方案 参照https://blog.csdn.net/chinesesword/article/details/51917496

让mysql驱动开启批量执行sql的开关。

怎么开启呢?在拼装mysql链接的url时,为其加上allowMultiQueries参数,设置为true,如下:

jdbc.jdbcUrl=jdbc:mysql://127.0.0.1:3306/database?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true

免责声明:文章转载自《遇到错误Check the judgetypet-InlineParameterMap.》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇内网域安全入侵感知系统watchAD树莓派打造音乐播放机下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

hibernate数据库配置

在文件夹etc中 ## MySQL #hibernate.dialect org.hibernate.dialect.MySQLDialect #hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect #hibernate.dialect org.hibernate.dialect.M...

Java学习:JDBC各类详解

 JDBC各个类详解 代码实现: //1.导入驱动jar包 //2.注册驱动 Class.forName("com.mysql.jdbc.Driver"); //3.获取数据库连对象 Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db3","root",...

数据源与数据库连接池

什么是数据源? JDBC2.0提供了javax.sql.DataSource接口,它负责建立与数据库的连接,当在应用程序中访问数据库时,不必编写连接数据库的代码,直接引用DataSource获取数据库的连接对象即可。用于获取操作数据的Connection对象。 什么是数据库连接池? 数据库连接池的思想就是为数据库连接建立一个“缓冲池”。预先在缓冲池中放入一...

Java之MyBatis

MyBatis中文文档:https://mybatis.org/mybatis-3/zh/index.htmlMyBatis是一款优秀的持久化框架,它支持定制化SQL、存储过程以及高级映射。MyBatis避免了几乎所有的JDBC代码和手动配置参数以及结果集。MyBatis可以使用简单的XML或注解来配置和映射原生类型、接口和Java的POJO(Plain...

Mybatis笔记(一)

目录 MyBatis MyBatis简介 MyBatis作用 历史 为什么要使用MyBatis? JDBC Hibernate Mybatis MyBatis入门程序 1.下载Mybatis核心包 2.创建工程,引入MyBatis核心包及依赖包 3.创建customer表,建立与表对象的domain 4.创建MyBatis核心配置文件Sq...

JDBC之查询

案例1:查询所有用户的信息,封装到一个List里面 1 String url="jdbc:mysql://localhost:3306/nz201"; 2 String user="root"; 3 String password="root"; 4 5 Connection...