Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Storing stream with JPA into BLOB fails?

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.
-- 
View this message in context: http://www.nabble.com/Storing-stream-with-JPA-into-BLOB-fails--tp23919850p23919850.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top