Hi Simone,

OpenJPA currently supports (judging from test cases) streaming LOB with MySQL, 
Oracle, PostgreSQL and SQL Server. However, even with these databases there are 
bugs to fix. OPENJPA-1248 [1] contains a few stack traces some of which are 
similar to yours. Thus the exception you are getting from a newer Derby might 
be an OpenJPA fault.

[1] https://issues.apache.org/jira/browse/OPENJPA-1248

Regards,
Milosz

> 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)
> 
> 
> -- 
> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
> http://www.simonegianni.it/
> 
> 

Reply via email to