Hi there
I have a table with a column of type CLOB (I'm using Oracle 10g)
Here I want to store a large set of characters (around 100k).
On the
Java side I've created an entity with the JPA annotations.
For the clob element I use the following declaration:
@Column(name="DATA", columnDefinition="CLOB NOT NULL")
@Lob
public
String getData() {
return data;
}
In the persistence.xml file I declare that Oracle
jdbc driver be used:
<property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
Now, whenever I try to insert a long string the following exception happens:
"java.sql.SQLException: setString can only process strings of less than 32766 chararacters"
I wonder if someone else has had this problem before?
If this were a limitation of the jdbc driver, then how can we work with
clob (lobs) elments transparently using JPA?
thanks