Getting CLOB data from ORACLE using JDBC

Hello all, first of all here is the Wm info :

Product webMethods Integration Server
Version 7.1.2.0
Updates None
Build Number 124
SSL Strong (128-bit)

Description JDBC Adapter
Adapter Version 6.5

ORACLE DRIVER : D:\webMethods7\IntegrationServer\packages\WmJDBCAdapter\code\jars\static\ojdbc5.jar

So, the problem is I’m trying to get an XML stored in a CLOB field on ORACLE 11g, but I’m getting this error back : com.wm.io.comm.CommException: [BAC.0002.0000] Wrapped Exception: java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection

I have tryied this using dynamic queries, store procedures, custom queries and alway the results are the same.

I have been trying several things like cast that field into LONGVARCHAR or something similar, but the problem is those data fields are too short and I am not getting all the information that I need.

if anyone had this problem before maybe you can give me a path to follow in order to solve this.

Thanks in advance,

Hermann

Thats a problem with the oracle driver, which sets T4CConnection as not serializable while it shuld.

Download the latest Oracle JDBC driver from oracle.

Thanks for that, but finally start working with no changes… os maybe something related to the connection was not working as expected.

Thanks anyway!

Hermann

Just in case you have this problem in the future, the solution is changing the output paramater datatype

By default the Wm developer put java.sql.clob and to get it work should be java.sql.string

You can see an image on the attachment.

Thanks and regards,

Hermann
CLOB.jpg

About the driver, is not the first time I see different jars in the CLASSPATH, and depending if you load/unload packages they take different order preference.

In your case it was related to the datatype, glad you solved it :smiley:

Hello,

I have the same error but with the change of data type it always does not work any help

I change the type to string and got the empty result when I rechange it to object or clob I get the probleme.

I use Oracle Jdbc 7

Hi Mohamed,

please provide your exact database version as well as the exact driver version.
What is your wM Version and JDBC-Adapter version?

For the driver version open the ojdbc7.jar with a ZIP-compatible tool and check for the META-INF/Manifest.MF file.
Open this with a text editor.

Latest version of Oracle driver working with JDK 7 is the 12.1.0.2 driver, from Oracle 12c R2 version onwards there is only JDK 8 and newer supported.

ojdbc-jar should only be located under WmJDBCAdapter/code/jars for all functions which rely on JDBC-Adapter package.

Regards,
Holger

Thank you for your reply.

I solved this probleme thanks

1 Like