I'm trying to save a CLOB into the database and recovering it, but I'm getting an SQLException:
Caused by: java.sql.SQLException: Lob read/write functions called while another read/write is in progress: getBytes()
at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2427)
at oracle.sql.BLOB.getBytes(BLOB.java:348)
at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:181)
I figured that the problem is when I tried to get the CLOB, because it's still saving. If the CLOB is small it works fine, but when the CLOB is a little bigger it fails.
Sorry about my english and thanks
EDIT:
The annotation is:
@Lob
@Column(nullable = false)
private String body;
The save method
emailRepository.save(email);