MySQL java.lang.NumberFormatException generated dependent on Stored Proc content

60 views
Skip to first unread message

Lindley Smith

unread,
Jul 13, 2015, 2:12:30 PM7/13/15
to db...@googlegroups.com
I'm using MySQL 5.6 and with a couple of my procs I've been getting exceptions as below when running from DbFit. But these procs work when called from the MySQL Workbench. You can see it is logging some of the proc, although the very first bit "11)" is not part of the proc. I haven't been able to confirm the exact cause of the problem but including clauses such as a "not exists" seems to be a bit of a trigger, and also "not in'. Am I doing something wrong? Is this a known feature? Is it the mysql jdbc drivers are out of date? Thanks

java.sql.SQLException: java.lang.NumberFormatException: For input string: "11) BEGIN declare linstructorid int; declare ltemplateusername varchar(50); declare ltemplateinstructorid int; declare lpermtemplateusername varchar(50); declare lpermtemplateinstructorid int; call log(concat('tradinginstrumentcreatetempl '" at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.Util.handleNewInstance(Util.java:430) at com.mysql.jdbc.CallableStatement.getInstance(CallableStatement.java:505) at com.mysql.jdbc.ConnectionImpl.parseCallableStatement(ConnectionImpl.java:3881) at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:3965) at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:3939) at dbfit.api.DbStoredProcedureCall.toStatementExecution(DbStoredProcedureCall.java:54) at dbfit.api.DbStoredProcedure.buildPreparedStatement(DbStoredProcedure.java:27) at dbfit.fixture.DbObjectExecutionFixture.doRows(DbObjectExecutionFixture.java:74) at fit.Fixture.doTable(Fixture.java:155) at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:18) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:99) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:87) at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:69) at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:34) at fitlibrary.DoFixture.interpretTables(DoFixture.java:42) at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26) at fit.Fixture.doTables(Fixture.java:80) at fit.FitServer.process(FitServer.java:81) at fit.FitServer.run(FitServer.java:56) at fit.FitServer.main(FitServer.java:41)

Lindley Smith

unread,
Jul 13, 2015, 2:22:38 PM7/13/15
to db...@googlegroups.com
This seems very similar to Bug #35199 which was fixed in MySQL Connector/J 5.1.6 which I believe is being used by DbFit

Lindley Smith

unread,
Jul 13, 2015, 2:37:01 PM7/13/15
to db...@googlegroups.com
Changing the proc return types from int/smallint/tinyint to decimal resolved the problem.

Lindley Smith

unread,
Jul 22, 2015, 10:06:31 AM7/22/15
to dbfit
I have subsequently replaced 5.1.6 in the dbfit install with 5.1.27 from mysql install and have successfully reverted return types to int

Yavor Nikolov

unread,
Jul 22, 2015, 12:26:07 PM7/22/15
to db...@googlegroups.com
Thank you for your feedback Lindley!

I can see the current version of MySQL JDBC driver is 5.1.36 (http://dev.mysql.com/downloads/connector/j/) so I wonder would it work fine with it too.

Best regards,
Yavor

On Wed, Jul 22, 2015 at 5:06 PM, Lindley Smith <lindle...@logicalfinancials.co.uk> wrote:
I have subsequently replaced 5.1.6 in the dbfit install with 5.1.27 from mysql install and have successfully reverted return types to int

--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To post to this group, send email to db...@googlegroups.com.
Visit this group at http://groups.google.com/group/dbfit.
For more options, visit https://groups.google.com/d/optout.

Lindley Smith

unread,
Jul 22, 2015, 5:09:07 PM7/22/15
to dbfit
Hi Yavor

Yes I imagine a lot of the newer versions would work. Strange part is that MySQL bugs 35199 and 39510 (https://bugs.mysql.com/bug.php?id=39510) both suggest they resolve this problem and that it was fixed in 5.1.6.

How do we get the JDBC driver updated in a dbfit release?

Regards
Lindley

Yavor Nikolov

unread,
Jul 25, 2015, 6:25:53 PM7/25/15
to db...@googlegroups.com
The mysql file in dbfit/lib folder may be replaced with different version.

You can also test the following experimental build which is bundled with mysql jdbc 5.1.36.

Regards,
Yavor

Reply all
Reply to author
Forward
0 new messages