Hi,
I am working on the spring project which intgrates with Hibernate through IOC. Recently, we came across weird issue. Here is the exception, Hope you could provide us with some solution.
java.sql.SQLRecoverableException: Closed Connection at oracle.sql.BLOB.getDBAccess(BLOB.java:1087) at oracle.sql.BLOB.length(BLOB.java:151) at org.hibernate.lob.SerializableBlob.length(Serializ ableBlob.java:31)
Code: byte[] bytes = ttFileInfo.getFileContent().getBytes(1, (int)blob.length());IOUtils.copy(ttFileInfo.getFileContent().getBinaryStream(), out);Exception is getting thrown when any method is called upon Blob object after it is received form Database. I can see all other contents like name of the file, size everything is rereived, except the binary stream,length or bytes[] data of BLOB.
I even tried the solution of session.refresh(entityobject), session.merge(entityobject) but no luck.
Expecting that any experts can provide me solution. Thanks in advance
Regards, Asmath.
|