Community
Participate
Working Groups
Build Identifier: 2.0.2 official release I attached the exception below. The insertion happens fine with eclipselink 2.0.0 and 1.1.1, but when I upgraded to 2.0.2, I got such exception. JPA tries to insert a row into a table. The table has a clob field (annotated as @Lob in Java class). The insertion failed when eclipselink 2.0.2 tries to insert into the clob field. I don't understand why it tries to shrink the clob field to 256 character wide. by the way, I am using Derby 10.4.2.0 as underlying database. IDE is eclipse 3.4, and runs on windows xp. Internal Exception: java.sql.SQLException: A truncation error was encountered trying to shrink CLOB 'opRun:PERMIT;opRunDef:PERMIT;opOpen:PERMIT;opList:PERMIT;opV&' to length 255. Error Code: -1 Call: INSERT INTO UOA_PSETS (ID, PERMISSIONS, DESCRIPTION, NAME) VALUES (?, ?, ?, ?) bind => [10392, opRun:PERMIT;opRunDef:PERMIT;opOpen:PERMIT;opList:PERMIT;opViewProps:PERMIT;opRepSrvProps:PERMIT;opInfoAssist:PERMIT;opAGA:PERMIT;opEditor:PERMIT;opCreateFL:PERMIT;opCreateItem:PERMIT;opWrite:PERMIT;opMakeManaged:PERMIT;opMakePrivate:PERMIT;opUpdateOwnership:PERMIT;opShareItem:PERMIT;opSaveDef:PERMIT;opDelete:PERMIT;opViewRulesOn:PERMIT;, Legacy ContentManager Permissions, WF_ContentManager] Query: InsertObjectQuery(com.ibi.ibss.dbdriver.IBSSPermissionSetDB[id=10392]) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63) at com.ibi.sqlscriptswithjpa.core.DBLoader.loadData(DBLoader.java:103) Reproducible: Always Steps to Reproduce: 1. create a java entity class with a lob field in it 2. try to insert a wider-than-256-char data into that field. 3. running on a derby database. expect a sql exception of truncation error was encountered trying to shrink CLOB
*** This bug has been marked as a duplicate of bug 307774 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink