Tuesday, February 25, 2014

Resolve a org.hibernate.HibernateException: Wrong column type in Error

Removed
While generating Entities, some problems can occur.  In fact in some Entities, I had this error:

org.hibernate.HibernateException: Wrong column type Found: int2, expected: int4

In my database, I was using smallint. But when the entities were generated, the attrbute type was set to Integer.

As I need smallint type in my database, the solution was to modify the attribute type to short.

This is sufficient to resolve the problem.

No comments :

Post a Comment

Articles les plus consultés