通过代理抛出使用mySql引起:java.sql.SQLException:不支持可调用语句。重新连接后 [英] Using mySql via proxy throws Caused by: java.sql.SQLException: Callable statements not supported. after reconnect

查看:89
本文介绍了通过代理抛出使用mySql引起:java.sql.SQLException:不支持可调用语句。重新连接后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我有这个问题。我启动我的应用程序然后当它运行我关闭mysql服务,当然我开始得到 java.sql.SQLException:不支持可调用语句。并且在启动mySql服务后一切正常,一切都恢复正常。问题是当我在DataBase和我的应用程序之间使用代理并在启动mySql服务后完全相同时我仍然得到异常。我知道代理工作正常,因为我检查了telnet到DB并在两种情况下都重新启动了应用程序精细。所以问题是什么可能导致这个异常,谢谢。

Hi guys i have this problem .I start my App then when its running I shut down mysql service and of course I starting to get java.sql.SQLException: Callable statements not supported. and it's ok after starting back the mySql service everything goes back to normal . The problem is when I use proxy between DataBase and my app and do exactly the same after starting mySql service I still get the exception.I know that proxy is working fine because I have checked telnet to DB and restarted the Application in both cases everything worked fine. So the question is what may cause this exception thanks.

PS:
可能值得一提的是我的App是基于Spring的Java应用程序

P.S: It's maybe worth mentioning my App is Spring based Java application

推荐答案

as

As stated on JavaGalaxy:


MySQL不支持MySQL版本5以下的存储过程。所以
如果您使用的MySQL服务器低于5,请尝试升级到MySQL服务器
版本5或更高版本。

MySQL has no support for Stored Procedures below MySQL version 5. So if you are using MySQL Server below 5 try and upgrade to MySQL Server version 5 or above.

如果您收到此错误,即使使用MySQL 5或更高版本然后是
,您使用的JDBC驱动程序可能不是适合您正在使用的MySQL服务器版本的
。尝试下载MySQL
连接器/ J驱动程序,例如(mysql-connector-java-5.1.6-bin.jar或更高版本)

If you are receiving this error even when using MySQL 5 or above then there is a possibility that the JDBC driver you are using is not suitable for MySQL server version you are using. Try downloading MySQL Connector/J Driver e.g. (mysql-connector-java-5.1.6-bin.jar or above)

点击这里下载MySQL。

这篇关于通过代理抛出使用mySql引起:java.sql.SQLException:不支持可调用语句。重新连接后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆