Hi All, I am trying to retrieve CLOB through CMP in Websphere. I get the below exception when I try to get the localInterface which contains CLOB field in my facade by using the findByPrimary Key method. java.lang.RuntimeException: InputStream does not contain a serialized object at com.ibm.vap.converters.streams.VapBinaryStreamToSerializableObjectConverter.objectFrom(VapBinaryStreamToSerializableObjectConverter.java:57) I am wondering if it is possible getting Clob through CMP in EJB. BTW I have tried using both String and CLOB as CMP field types matching to CLOB in Oracle DB.
You need to change the converter that is in use on this field. The error is telling you that this CLOB does not contain a serialized object -- which from what you're telling us is right. Go to the properties view of the mapping editor (down at the bottom of the page) and try changing the converter (under "transformation") to a "VapBinaryStreamtoByteArrayConverter", and then change the field type you are mapping it to to a ByteArray if you want to treat it as a byte array. If you wanted to treat it as a String, try changing the field type to String and using a "VapAsciiStreamtoStringConverter". The hows and whys of converters are covered in the Advanced EJB mapping chapter of my book, by the way... Kyle