Friday, July 24, 2009

java.sql.SQLException: Unsupported feature

This week I hit a problem when my application tried to write a blob to a Database.
I use container managed persistence with Websphere. It turned out the ojdbc jar at the location pointed to by the websphere variable - "ORACLE_JDBC_DRIVER_PATH" - needed to be updated to ojdbc14 which you can pick up from the Oracle lib folder.

This is part of the exception stack trace:

java.sql.SQLException: Unsupported feature
at oracle.jdbc.dbaccess.DBError.throwSqlException
(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException
(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException
(DBError.java:269)
at oracle.jdbc.dbaccess.DBError.
throwUnsupportedFeatureSqlException(DBError.java:689)
at oracle.sql.BLOB.setBinaryStream(BLOB.java:1007)

Note: Make sure you pick up this jar from the Oracle library. Other versions of ojdbc14 might not solve this problem.

No comments:

Post a Comment