Topic: 返回结构序列化错误

  Print this page

1.返回结构序列化错误 Copy to clipboard
Posted by: sgt8023
Posted on: 2003-08-07 16:24

在Weblogic7上部署了一个SessionBean,用它访问OracleServer中的一个Blob字段,并使用
oracle.sql.BLOB fileBlob=rs.getBLOB("blob");
InputStream is=((oracle.sql.BLOBlack EyefileBlob).getBinaryInputStream();
方法成功获得了InputStream is,最后将这个SessionBean将is返回给客户端调用者。可是我在客户端调用这个SessionBean时抛出异常,是说OracleBlobInputStream不能被序列化,如果是自己定义的类还可以implements Serializable,可是这种情况该怎么处理呀?哪位大侠指点迷津?

java.rmi.MarshalException: error marshalling return; nested exception is:
  java.io.NotSerializableException: oracle.jdbc.driver.OracleBlobInputStream

Start server side stack trace:
java.io.NotSerializableException: oracle.jdbc.driver.OracleBlobInputStream

  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)

  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

  at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:107)

  at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:82)

2.Re:返回结构序列化错误 [Re: sgt8023] Copy to clipboard
Posted by: 256456
Posted on: 2003-08-08 09:28

InputStream is=((oracle.sql.BLOfileBlob).getBinaryInputStream();

改成

InputStream is= fileBlob.getBinaryStream();


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923