Oracle SQL job error "Invalid column type: getString/getNString not implemented for class oracle.jdbc.driver.T4CBlobAccessor"

Document ID : KB000088138
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
Invalid column type: getString/getNString not implemented for class oracle.jdbc.driver.T4CBlobAccessor

A SQL select statement to an Oracle Database is executed in a SQL-Job, similar to the example below (marked in green). The table contains a BLOB (Binary Large Object) field. This results in the above error (marked in red).
 
0EMb0000001Qubi.png
Environment:
OS Version: N/A
Cause:
Cause type:
By design
Root Cause: Blob data is not supported and needs to be converted to a string within the SQL. As blob can get several GB, displaying all this data in an SQL-job could cause the system to hang.
Resolution:
Use DBMS_lob function similar to the one shown below. In this example the column ABLOB_CONTENT has a data type of BLOB
 
select ABLOB_AH_IDNR
, ABLOB_KEY
, dbms_lob.substr(ABLOB_CONTENT, 2000, 1)
from ablob


Fix Status: No Fix

Fix Version(s):
N/A
Additional Information:
Workaround :
N/A