[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] Storing stream with JPA into BLOB fails?
|
- From: James Sutherland <jamesssss@xxxxxxxxx>
- Date: Wed, 10 Jun 2009 10:39:46 -0700 (PDT)
- Delivered-to: eclipselink-users@eclipse.org
You can use stream binding in EclipseLink using
DatabaseLogin.useStreamsForBinding(), (using a SessionCustomizer).
For Oracle Lobs you may need to use the Oracle9Platform (or 8/9/10) with the
thin driver for lobs over 4k.
Ari Heino wrote:
>
> I'm trying to save InputStream into blob column, but I get error while
> getting stream from blob object with JPA.
>
> It seems that reading/writing to empty blob instance causes failure, so is
> it at all possible to insert stream with JPA/EclipseLink? Or only via JDBC
> like:
>
> pstmt.setBinaryStream(1,new
> ByteArrayInputStream(dataAsByteArray),dataAsByteAr ray.length);
>
> I tried using "BLOB.getEmptyBLOB()" with Oracle 10, but that just returns
> some 17000-series errror code about not being able to deal with empty
> blob.
>
> I'm using EclipseLink 1.1.0. in OSGi/Equinox container.
>
-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Storing-stream-with-JPA-into-BLOB-fails--tp23919850p23967406.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.