使用druid出现17401问题始末

线上运行了一段时间的项目,突然报出一条简单的查询错误。

org.springframework.jdbc.UncategorizedSQLException:
### Error querying database.  Cause: java.sql.SQLException: Protocol violation
### The error may exist in file [/opt/tomcat7/webapps/ZHFQWebService/WEB-INF/classes/mapper/LoanQueryMapper.xml]
### The error may involve com.zhph.mapper.LoanQueryMapper.queryLoanInfo-Inline
### The error occurred while setting parameters
### SQL: select * from    xj_loan_base_info where loan_id=?
### Cause: java.sql.SQLException: Protocol violation
; uncategorized SQLException for SQL []; SQL state [null]; error code [17401]; Protocol violation; nested 
 
出现这个问题首先去查询表sql语句,表结构;
其次查询是否有特殊字段有注入的情况;
然后检查druid连接池是否正常和事务锁;
发现都没有出现问题;
然后万能的百度,发现这篇文字;
http://www.zhimengzhe.com/shujuku/Oracle/303311.html
查询数据库日志,修改了可能出现的问题; select * ,其次修改相同不同的sqlid 出现相同的sql语句。问题没有在此出现过。 先并发测试一下看看有没有这个问题。
 
 
原文地址:https://www.cnblogs.com/tiandjnet/p/9235414.html