jdbc启动错误(The driver has not received any packets from the server)
来源:互联网 发布:windows xp怎么升级 编辑:程序博客网 时间:2024/06/05 06:52
1.2 解决方法
- 如果使用的是JDBC,在JDBC URL上添加?autoRec>,如:
jdbc:mysql://10.10.10.10:3306/mydb?autoRec
- 如果是在Spring中使用DBCP连接池,在定义datasource增加属性validationQuery
和testOnBorrow
,如:
<bean id="vrsRankDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${countNew.jdbc.url}" /> <property name="username" value="${countNew.jdbc.user}" /> <property name="password" value="${countNew.jdbc.pwd}" /> <property name="validationQuery" value="SELECT 1" /> <property name="testOnBorrow" value="true"/></bean>
- 如果是在Spring中使用c3p0连接池,则在定义datasource的时候,添加属性testConnectionOnCheckin
和testConnectionOnCheckout
,如:
<bean name="cacheCloudDB" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="${jdbc.driver}"/> <property name="jdbcUrl" value="${cache.url}"/> <property name="user" value="${cache.user}"/> <property name="password" value="${cache.password}"/> <property name="initialPoolSize" value="10"/> <property name="maxPoolSize" value="${cache.maxPoolSize}"/> <property name="testConnectionOnCheckin" value="false"/> <property name="testConnectionOnCheckout" value="true"/> <property name="preferredTestQuery" value="SELECT 1"/></bean>
在mysql的安装目录下找到my.ini
添加
show global variables like 'wait_timeout';wait_timeout=
31536000
interactive_timeout=
31536000
set global wait_timeout=28800;目录:/etc/my.cnf
阅读全文
0 0
- jdbc启动错误(The driver has not received any packets from the server)
- jdbc启动错误(The driver has not received any packets from the server)
- kettle错误:The driver has not received any packets from the server
- 数据库连接超时The driver has not received any packets from the server
- 关于activiti连接数据库超时问题—— The driver has not received any packets from the server
- 连接MySQL数据库时出现The dirver has not received any packets from the server
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
- Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- The last packet sent successfully to the server was 0 milliseconds ago, The driver has not received
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- 错误:The message received from the server could not be parsed.
- 解决问题: The message received from the server could not be parsed
- 错误Communications link failure,The last packet successfully received from the server was的解决方法
- The proxy server received an invalid response from an upstream server.(错误原因)
- the JDBC Driver has been forcibly unregistered.
- The JDBC Driver has been forcibly unregistered
- 【解决Tomcat启动异常】To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
- 第一人称<Rotate>
- 2017.06.18 总结近一周学习
- 基于android的Socket通信
- Java基础教程30-接口
- 第一人称<SceneController >
- jdbc启动错误(The driver has not received any packets from the server)
- Spring3.1.0实现原理分析(十四).MVC之处理器映射
- dubbo 实践
- 用于Matlab的多摄像机系统校准工具箱 用于Matlab的多摄像机系统校准工具箱 这是用于校准多摄像机系统的工具箱。该工具箱的要求是系统中的两个相邻摄像机应该能够同时看到校准板的某些部分。一般来说
- Python之数组(array)使用方法总结与Numpy中的数组用法
- 计算机网络
- nginx_upstream_check_module
- doc2vec用于训练文本向量-deeplearning4j实现
- Cookie完成自动登录及Config和ServletContext