IBM Support

A "java.lang.ClassNotFoundException: oracle.sql.BLOB" exception occurs in Websphere Process Server (WPS)



If you use oracleLobHandler in Spring to read or write to the BLOB field in an application that is deployed on WebSphere Process Server, you might encounter a "java.lang.ClassNotFoundException: oracle.sql.BLOB" exception.


You can see the following exception in the WebSphere Process Server log file:

Could not create Oracle LOB; nested exception is org.springframework.
dao.InvalidDataAccessApiUsageException: Couldn't initialize
OracleLobHandler because Oracle driver classes are not available. Note
that OracleLobHandler requires Oracle JDBC driver 9i or higher!; nested
exception is java.lang.ClassNotFoundException: oracle.sql.BLOB

Even if you have the correct Oracle JDBC driver version and have added it to the WebSphere Process Server library path, the issue persists. It gives the appearance that the WebSphere Process Server class loader is failing to load the Oracle JDBC driver.


This exception is caused by an incorrect oracleLobHandler interface selection in the Spring configuration. There is more than one oracleLobHandler defined within the Spring configuration. You must select the correct oracleLobHandler for the platform that you use. The problem is not caused by the WebSphere Process Server class loader.

Resolving The Problem

To resolve this issue, change the Spring configuration file.

Find the following line of code:
<bean id="nativeJdbcExtractor"
class="" />

Change it to the following code:
<bean id="nativeJdbcExtractor"
class="" />

The problem should be resolved.

[{"Product":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Artifact Loader\/Resolver","Platform":[{"code":"PF002","label":"AIX"}],"Version":"","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Product Synonym


Document Information

Modified date:
15 June 2018