Issue with JDBC Query on Sybase database for certain data where a Java I/O exception is thrown wrapped in an SQL exception.

Issue with JDBC Query on Sybase database for certain data where a Java I/O exception is thrown wrapped in an SQL exception.

book

Article ID: KB0093041

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
Exception with Sybase Database Call - java.io.IOException: JZ0TC: Attempted conversion between an illegal pair of types.
Symptoms:

"JDBC error reported: (SQLState = JZ006) - java.sql.SQLException: JZ006: Caught IOException: ."

                at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)

                at com.tibco.pe.plugin.Activity.eval(Unknown Source)

                at com.tibco.pe.core.TaskImpl.eval(Unknown Source)

                at com.tibco.pe.core.Job.a(Unknown Source)

                at com.tibco.pe.core.Job.k(Unknown Source)

                at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)

                at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)

caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0TC: Attempted conversion between an illegal pair of types.


Cause:
Attempted conversion between an illegal pair of types.

Issue/Introduction

Issue with JDBC Query on Sybase database for certain data where a Java I/O exception is thrown wrapped in an SQL exception.

Resolution

If using a Sybase driver, upgrade to  jconn-7.0.7.jar .

If using a TIBCO DatatDirect driver, look for the exception details from Designer. Use the CONVERT function within the query to modify select data. A sample is shown below. 


CONVERT(CHAR(20),req_id,8) req_id

$formula($global.my_email_signature)