You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Niraj Shah <sh...@gmail.com> on 2015/07/10 08:06:35 UTC

Data truncation error from DBDictionary.narrow

I'm using SolidDB database using OpenJPA persistence framework. The program
has been working for a very long during (more than 3 months) and everything
has been working fine. I have checks to ensure not to enter data larger
than the DB column sizes. But suddenly I've started seeing Data truncation
issue. It is coming continuously and all inserts are failing. I'm sure that
my data has not exceeded the column width. The error does not give
information about any particular column or data type. Can anyone help in
determining root cause for this?
openjpa-2.2.2

solidDB - Version 7.0.0.7 Build 2013-08-27



Exception from logs:

Caused by: <openjpa-2.2.2-SNAPSHOT-r422266:1462076 fatal general error>
org.apache.openjpa.persistence.PersistenceException: Data truncation
at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4962)
at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4922)
at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:110)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:62)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:90)
at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:105)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:78)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:732)
at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
... 12 more
Caused by: java.sql.DataTruncation: Data truncation
at solid.jdbc.SolidTC.s_ChkParValue(Unknown Source)
at solid.jdbc.SolidTC.setString(Unknown Source)
at solid.jdbc.SolidPreparedStatement.setString(Unknown Source)
at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:315)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.setString(LoggingConnec
  tionDecorator.java:1391)
at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:315)
at
org.apache.openjpa.jdbc.sql.DBDictionary.setString(DBDictionary.java:1230)
at org.apache.openjpa.jdbc.sql.DBDictionary.setTyped(DBDictionary.java:1331)
at org.apache.openjpa.jdbc.sql.RowImpl.flush(RowImpl.java:896)
at org.apache.openjpa.jdbc.sql.RowImpl.flush(RowImpl.java:856)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:117)
at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.j
  ava:79)
at
com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:63)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:100)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:88)
... 19 more



Thanks and regards,

Niraj