java blob到字节数组转换错误问题

时间:2014-04-15 10:15:41

标签: java blob

我在转换时遇到错误。我们在这里使用休眠。
请建议我们如何解决这个问题。

blob = (Blob) resultList.get(i);
int blobLength = (int) blob.length();
topublishedFile = blob.getBytes(1, blobLength);

我们得到的错误如下。

2014-04-15 15:34:54,880 INFO  DB2Interceptor.onPrepareStatement - IN INTERCEPTOR CLASS
[4/15/14 15:34:54:881 IST] 00000025 SystemOut     O Hibernate: select STD_BLOB_PDF FROM estd.tbadress where std_number = ? with ur for fetch only 
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R com.ibm.db2.jcc.b.SqlException: [jcc][10120][11936][3.50.152] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R     at com.ibm.db2.jcc.b.wc.a(wc.java:55)
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R     at com.ibm.db2.jcc.b.wc.a(wc.java:93)
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R     at com.ibm.db2.jcc.b.rd.d(rd.java:67)
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R     at com.ibm.db2.jcc.b.rd.r(rd.java:56)
[4/15/14 15:39:47:515 IST] 00000025 SystemErr     R     at com.ibm.db2.jcc.b.rd.length(rd.java:41)

0 个答案:

没有答案