java.sql.SQLException: String or binary data would be truncated.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Rashit A. Fakhreyev, 1 year ago
String or binary data would be truncated.
via Atlassian JIRA by Rashit A. Fakhreyev, 1 year ago
String or binary data would be truncated.
via atlassian.com by Unknown author, 1 year ago
via jtds by alin_sinpalean
, 1 year ago
Error converting data type smallint to tinyint.
via jtds by cpalmera
, 1 year ago
Column or parameter \#1: Specified column precision 38 is greater than the maximum precision of 28.
via Atlassian JIRA by William Crighton [CCC], 1 year ago
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
java.sql.SQLException: String or binary data would be truncated.
at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(SqlMessage.java:392)
at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(SQLWarningChain.java:91)
at net.sourceforge.jtds.jdbc.Tds.goToNextResult(Tds.java:750)
at net.sourceforge.jtds.jdbc.TdsStatement.getMoreResults(TdsStatement.java:710)
at net.sourceforge.jtds.jdbc.TdsStatement.executeCallImpl(TdsStatement.java:302)
at net.sourceforge.jtds.jdbc.TdsStatement.internalExecuteCall(TdsStatement.java:282)
at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(PreparedStatement_base.java:136)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1821)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3863)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.