问题
I have Blob bl = pstmt.getConnection().createBlob(); a code where it is trying to create/save a blob in Oracle: returning the following error: "Method is not implemented by JDBC driver"
That is the message I am getting, cant see more.
The application is in a Jboss EAP 5.1 with the following changes: - jboss-common-jdbc-wrapper.jar --changed--> jboss-as-connector-6.1.0.final-jboss-common-jdbc-wrapper.jar - server/all/lib/ojdbc6.jar
Which can be the problem?
回答1:
This is a JDBC version / JDBC driver mismatch. The Connection.createBlob()
method is added in JDBC level 4, and the ojdbc6 JAR is supposed to support that: see Support for JDBC 4 in the Oracle "Database JDBC Developer's Guide and Reference" document (Oracle 11g release 1).
You say you are using ojdbc6.jar, but maybe it is an older version, or maybe there is a different Oracle driver JAR ahead of it on the runtime classpath.
来源:https://stackoverflow.com/questions/30190218/creating-blob-oracle-returns-method-is-not-implemented-by-jdbc-driver-jboss