getting exception-optionaldata exception
Hi,
I am trying to read data from a table which is being populated by JMS.
Following is the code I have written to extract the data from the column which is of blob datatype.
StringBuffer blob = new StringBuffer("select messageblob from jms_messages");
Connectioncon= null;
String className= null;
con = DBUtils.getConnection(DBDataSource.FQ_DS);
PreparedStatement pstmt = con.prepareStatement(blob.toString());
ResultSet rs = pstmt.executeQuery();
rs.next();
try
{
InputStream is = rs.getBlob(1).getBinaryStream();
ObjectInputStream oip = new ObjectInputStream(is);
Object object = (Object)oip.readObject();
className = object.getClass().getName();
oip.close();
is.close();
rs.close();
pstmt.close();
con.commit();
}
catch(Exception eee)
{
eee.printStackTrace();
}
I am getting OptionalDataException here
Object object = (Object)oip.readObject();
what is wrong with these code ? Can anybody suggest anything ?

