I came across a problem on site yesterday. In moving the
development environment to a new server and creating more
appropriate permissions for users (they were using ALL on *.*) I
found that the Java application would crash with a
NullPointerException. The permissions were standard, and calling
the Stored Procedure worked via the mysql prompt.
CREATE USER devuser@99.99.99.99;
GRANT SELECT,INSERT,UPDATE,DELETE,EXECUTE ON devdb.* to devuser@99.99.99.99;
CALL sp_test()
You can spend a lot of time looking into problems, luckily this
development configuration had taken my advice to enabled the
General Query Log. (Something everybody should do to know your
SQL).
In closer inspection the following command was being sent to the
MySQL Server. SHOW CREATE PROCEDURE sp_test; Attempting to
run this command via the mysql prompt works.
SHOW CREATE PROCEDURE sp_test;
+-----------+----------+------------------+
| Procedure …
[Read more]