A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
java.lang.AbstractMethodError
nikil shar
Ranch Hand
Joined: May 25, 2008
Posts: 116
posted
Dec 01, 2009 14:30:21
0
hi all,
am getting this below error when trying to use the setBinaryStream method.
SEVERE: StandardWrapperValve[EDPServlet]: PWC1406: Servlet.service() for
servlet
EDPServlet threw exception
java.lang.AbstractMethodError
: oracle.jdbc.driver.OraclePreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
String sql = "UPDATE BILL set PDF = ?, ISPREGENERATED .....; byte[] bill = //read bytes from file is = new ByteArrayInputStream(bill); //store bill in BLOB in oracle db ps.setBinaryStream(1, is); <-- error thrown at this line
my environment :
CLASSPATH=.;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;
database version : 11.1.0.7
Driver name: Oracle
JDBC
driver
Driver version: 9.2.0.1.0
App server : glassfish v3 Prelude
java
version : 1.6
thanks in advance.
Travis Hein
Ranch Hand
Joined: Jun 06, 2006
Posts: 161
posted
Dec 01, 2009 18:40:05
0
CLASSPATH=.;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;
the setBinaryStream() was 'invented' in JDBC 4 specification, which comes with java 1.6
the oracle ojdbc14.jar is targeting java 1.4, that implements JDBC 2.1 spec.
So you need to (get and) use ojdbc16.jar in the classpath instead.
see also:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html
http://onjava.com/onjava/2006/08/02/jjdbc-4-enhancements-in-java-se-6.html
Error: Keyboard not attached. Press F1 to continue.
nikil shar
Ranch Hand
Joined: May 25, 2008
Posts: 116
posted
Dec 01, 2009 20:07:16
0
hey that worked. i downloaded 'ojdbc5.jar' and included it in my classpath and it worked.
thanks a lot for your help.
I agree. Here's the link:
http://zeroturnaround.com/jrebel/download
subject: java.lang.AbstractMethodError
Similar Threads
getting a CLOB value as a String object
When Running dynamic WebApplication This Exception Showing
Callable Statement
JDBC - How to find Oracle Driver Version
Unsupported feature
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter