I am using this version of Oracle: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I have a javaservlet web application (jdk 1.6) and can't write to a BLOB column using the JBoss connection pool. I've tried several combinations of using java.sql.Blob and oracle.jdbc.BLOB with getUnderlyingResultset. I'm looking for some sample code or a best practice document on how to accomplish this seemingly simple task of writing to a BLOB.
I could post my code but not sure which version to post and thought there might be a best-practice on this.
Here's one of the many exceptions I've gotten using various attempts:
10:16:55,331 INFO [STDOUT] 10:16:55,331 ERROR CommitAttachDocument - Error encountered while uploading file
java.lang.ClassCastException: oracle.jdbc.driver.OracleResultSetImpl cannot be cast to oracle.jdbc.OracleResultSet
Can someone please provide a sample or link to a best practice document?
Thanks for providing the answer. That solved the problem! I was packaging the ojdbc14.jar with my application. In addition to that, I discovered an older version of an ojdbc14.jar file in the JBOSS_HOME/server/<servername>/lib folder. I removed the older version and replaced it with the ojdbc14.jar compatible with 10.2 of Oracle.
Thanks again for resolving this - I was looking in the wrong direction!
subject: What is the best way to write to BLOB from servlet application running under JBoss