In my case Object is getting saved in a blob format but while we try to read and save that blob in a file it is not getting read giving EOFException and available() method of ObjectInputStream shows 0 that means there is nothing to be read . Then I checked in DB there was data in a blob format.
Can anyone help in in understanding that how hibernate stores an object in a blob format. What I analyzed is it is adding some special character while saving object in DB so that not able to convert byte to object format, as it is giving EOFException . The code I am writting is