Application deployment on JBoss EAP 5 fails due to "java.sql.SQLException: Unable to convert between X1 and X2" error

Solution Verified - Updated -

Issue

The following error is showed in the deployment of an application using Hibernate as persistence framework:

INFO  [org.hibernate.type.IntegerType] (HDScanner) could not read column value from result set: COD3_887_0_; Unable to convert between net.sourceforge.jtds.jdbc.ClobImpl and INTEGER.
WARN  [org.hibernate.util.JDBCExceptionReporter] (HDScanner) SQL Error: 0, SQLState: 22005
ERROR [org.hibernate.util.JDBCExceptionReporter] (HDScanner) Unable to convert between net.sourceforge.jtds.jdbc.ClobImpl and INTEGER.
INFO  [org.hibernate.event.def.DefaultLoadEventListener] (HDScanner) Error performing load command
org.hibernate.exception.DataException: could not load an entity: [my.package.MyEntity#510]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 5.1.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content