Executing EDS query with EasySoft JDBC-ODBC bridge results in java.lang.NumberFormatException

Solution Unverified - Updated -

Environment

  • JBoss Enterprise Data Services (EDS) 5.3.1
  • EasySoft JDBC-ODBC bridge

Issue

  • Accessing data sources using Third-party JDBC driver results in java.lang.NumberFormatException
  • Third-party JDBC driver in EDS but running query in EDS throws a java.lang.NumberFormatException error.
  • Running query results in exception similar to:
Remote org.teiid.core.TeiidProcessingException: DataSourcel_3: Unexpected exception while translating results: Error; - nested throwable: (java.lang.NumberFormatException: For input string: )
  • Error similar to below in server.log:
java.lang.NumberFormatException: For input string: "0�"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:481)
    at java.lang.Integer.<init>(Integer.java:636)
    at easysoft.sql.jobResultSet.getTimestamp(Unknown Source)
    at easysoft.sql.jobResultSet.getTimestamp(Unknown Source)
    at org.jboss.resource.adapter.jdbc.WrappedResultSet.getTimestamp(WrappedResultSet.java:966)
    at org.teiid.translator.jdbc.JDBCExecutionFactory.retrieveValue(JDBCExecutionFactory.java:912)
    at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:103)
    at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:294)
    at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:279)
    at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:354)
    at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:143)
    at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:140)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120)
    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:244)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:122)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)

Resolution

This indicates an issue with the Easysoft driver encoding settings. This may be able to be addressed by setting the JDBC URL's unicode property to "unicode=on" as in the below example:

<connection-url>jdbc:easysoft://10.10.11.12:8831/PostgreSQL30:logonuser=user:logonpassword=password:trace=on:multi=on:unicode=on</connection-url>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.