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


Solutions on the web

Solution icon of atlassian
via Atlassian JIRA by Rashit A. Fakhreyev, 1 year ago
String or binary data would be truncated.

Solution icon of atlassian
via Atlassian JIRA by Rashit A. Fakhreyev, 1 year ago
String or binary data would be truncated.

Solution icon of web
String or binary data would be truncated.

Solution icon of atlassian
via Atlassian JIRA by Philip Harling, 1 year ago
String or binary data would be truncated.

Solution icon of atlassian
via Atlassian JIRA by Philip Harling, 1 year ago
String or binary data would be truncated.

Solution icon of atlassian
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.

Solution icon of atlassian
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.

Solution icon of sourceforge
via jtds by alin_sinpalean
, 1 year ago
Error converting data type smallint to tinyint.

Solution icon of sourceforge
Column or parameter \#1: Specified column precision 38 is greater than the maximum precision of 28.

Solution icon of sourceforge
fetch: The fetch type prior cannot be used with forward only cursors.

Stack trace

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.sourceforge.jtds.jdbc.PreparedStatement_base.executeUpdate(PreparedStatement_base.java:290)
	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)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.