IBM Support

"NumberFormatException: For input string:" thrown on WebSphere Adapter for JDBC version 6.2

Troubleshooting


Problem

The "NumberFormatException: For input string: " is being thrown on WebSphere Adapter for JDBC version 6.2 in an JDBC export scenario.

Environment

Problem emerged after upgrade from WebSphere JDBC Adapter 6.0 to version 6.2, connecting to the same database.

Diagnosing The Problem

Problem is located in the same thread when accessing the JDBC driver (trace string "com.ibm.j2ca.*=all").

Resolving The Problem

In the traces and FFDC files, the following exception can be found:

      "Exception = java.lang.NumberFormatException
      Source = com.ibm.j2ca.dbadapter.core.runtime.commands.DBCreateCommand.execute
      probeid = 185
      Stack Dump = java.lang.NumberFormatException: For input string: "11 08:15:20"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:498)
      at java.lang.Integer.parseInt(Integer.java:539)
      at java.sql.Date.valueOf(Date.java:102)
      at com.ibm.j2ca.dbadapter.core.runtime.DBOperationHandler.setParameterorNull(DBOperationHandler.java:3464)
      "

The input string for the JDBC Adapter provided can be a date or something similar. For above example it is : "2011-02-11 08:15:20".

A potential cause of the problem is an incorrect JDBC driver version. In case of an Oracle DB version 10g, please use the JDBC driver "ojdbc6.jar" and not the thin client driver "ojdbc14.jar".

Another cause of the NumberFormatException can be found here:


"NumberFormatException in runtime when the MaxNumOfRetRS is greater than 999"http://www.ibm.com/support/docview.wss?rs=695&uid=swg21408744

[{"Product":{"code":"SSMKUK","label":"WebSphere Adapters Family"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Adapter for JDBC","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.2","Edition":"WebSphere","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
15 June 2018

UID

swg21569891