Has this problem been fixed in 3.1B1?
I don't think so. The relevant line from the stack trace is line 255 in java/org/apache/cayenne/dba/oracle/OracleLOBBatchAction.java.
On trunk in /trunk/framework/cayenne-jdk1.5-unpublished/src/main/ , this line reads:

OutputStream out = blob.setBinaryStream(0);

Offsets in JDBC generally start at 1, not zero, and the JDBC specs on Blob#setBinaryStream are no exception, so this should be

OutputStream out = blob.setBinaryStream(1);
The salient point is in the last answer, by Ale Gonzalez: Don't use 0 on setBinaryStream.
Actually, it's even documented in the Javadoc for #setBinaryStream.
(Somebody deserves to roast somewhere unpleasant for having JDBC use 1 and the rest of the JDK use 0. It's a first-rate source of bugs.)
Or is our only option to find and use an older Oracle JDBC adapter.
If you can work from the Cayenne sources, you might want to consider applying that one-line fix to the sources until upstream gets around to fixing this.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
groupuser @
postedJul 2, '12 at 9:21p
activeJul 5, '12 at 4:14p



site design / logo © 2022 Grokbase