We have a java tomcat server on one end, and a mysql on the other.
We are using mysql-connector-java, tried with versions 5.1.11 and 5.1.22. The mysql server version is 5.5.26
We do not have all the permissions for the mysql.proc table, as it is a security risk to all databases.
I can execute the procedures when I log in mysql with the given username and password, but when used from java (jdbc) it blows up with
java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
I tried the suggestion mysql has given, used 'noAccessToProcedureBodies=true' in our jdbc connection URL's. Didn't help at all! No difference whatsoever. (Here is an example of jdbc connection string I used: jdbc:mysql://xxxxxx:xxxx/xxxx?noAccessToProcedureBodies=true&useInformationSchema=true )
As I read http://bugs.mysql.com/bug.php?id=61203 I saw there is a bug in the connector and I tried using useInformationSchema=true as suggested. Didn't help, and neither did updating the mysql-connector-java, even though the bug is supposed to be fixed.
Has anyone faced this? I guess I am doing something wrong, everyone says it should work but for me it doesnt.
Thanks in advance!
Haven't verified it... just use this: useInformationSchema=true for sql URL. (dont put noAccessToBodies).
I have MySQL Server Version : 5.1.52
My SQL Connector jar : mysql-connector-java-5.1.7-bin.jar
Tomcat : 22.214.171.124
The above problem got solved by adding
noAccessToProcedureBodies=true and it works for me !