Why Do I Get Java.Lang.Abstractmethoderror When Trying to Load a Blob in the Db

Why do I get java.lang.AbstractMethodError when trying to load a blob in the db?

It looks that even if the driver 10.2 is compatible with the JDBC3 it may not work with JRE6
as I've found here:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#02_03

Which JDBC drivers support which versions of Javasoft's JDK?

pre-8i OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x

8.1.5 OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x

8.1.6SDK THIN Driver - JDK 1.1.x and JDK 1.2.x (aka Java2)

8.1.6SDK OCI Driver - Only JDK 1.1.x

8.1.6 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x

8.1.7 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x

9.0.1 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x and JDK 1.3.x

9.2.0 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x

10.1.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x

10.2.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, JDK 1.4.x, and JDK 5.0.x

11.1.0 OCI and THIN Driver - JDK 1.5.x and JDK 1.6.x

Oracle 10.2.0 supports:

Full support for JDBC 3.0

Note that there is no real change in the support for the following in the database. Allthat has changed is that some methods that previously threw SQLException now do something more reasonable instead.

result-set holdability

returning multiple result-sets.

Why do I get java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection error?

The cause of the problem is incompatible software (jar files).

createBlob is a new method (introduced in java 1.6), so older drivers are very unlikely to implement it.

Make sure your classpath only contains compatible drivers, and not any earlier versions of the drivers. (Thanks Jochen)

AbstractMethodError setBinaryStream on Tomcat

After a while I found a solution.

I downloaded tomcat 7 and copied over the tomcat-dbcp.

The tomcat-dbcp 7 contains dbcp 1.4 and provides JDBC 4.0 support.

AbstractMethodError thrown at runtime with java.sql.Connection

I believe that your problem is due to the fact that you use a JDBC driver for a version of Java <= 6 and you use Java 7 or higher because the method Connection#getSchema() has been added in Java 7.

Use the latest version of your JDBC driver to avoid such issue or at least a JDBC driver compatible with your version of Java.



Related Topics



Leave a reply



Submit