Have you tried running with Derby 10.5.1.0 or 10.5.3.0?
Looking at the Derby 10.5.1.1 release notes, there were a lot of stream/lob/clob fixes that went in...

I tried running the TestInputStreamLob and TestReaderLob junits in trunk against Derby 10.5.3.0 and am seeing the same test failures as with MSSQL (10 test failures total while reading from an InputStream object from a returned entity), so there is a chance it may work for what you need until we have time to resolve the test failures and make any additional code updates.


-Donald


Simone Gianni wrote:
Hi all,
I've been experimenting with the streaming LOB on Apache Derby and Hsql. I'm using OpenJPA 1.2.0.

On Hsql, it is not supported because it does not support select for update.

On Derby 10.1.2.1 (reported as supported in http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/manual/manual.html#supported_databases) and up to 10.2.2.0 it does not work. An exception [1] is thrown when trying persisting.

On Derby 10.4.1.3, 10.4.2.0, 10.3.2.1 it fails with an exception, but not when writing, during read operation [2]. Looking at derby source, seems like an IOException is thrown when stream value is null.

The same application works perfectly on different versions of MySQL, both on windows and linux.

Has anyone managed to have streaming lob working on Derby? Am I missing some configuration option?

Simone



[1]
Caused by: SQL Exception: Feature not implemented: no details.
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
       at org.apache.derby.impl.jdbc.Util.notImplemented(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedBlob.setBinaryStream(Unknown Source) at org.apache.openjpa.jdbc.sql.DBDictionary.updateBlob(DBDictionary.java:4310) at org.apache.openjpa.jdbc.meta.strats.LobFieldStrategy.customInsert(LobFieldStrategy.java:112) at org.apache.openjpa.jdbc.meta.FieldMapping.customInsert(FieldMapping.java:701) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager$CustomMapping.execute(AbstractUpdateManager.java:352) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:94)

[2]
Caused by: java.io.IOException
at org.apache.derby.iapi.services.io.NewByteArrayInputStream.read(Unknown Source)
       at java.io.InputStream.read(InputStream.java:85)


Reply via email to