in hibernate Types (IntegerType, ....) are used to set values to a PreparedStatement to persist an object and to read values from a ResultSet to transform a persistet object back to a java object.
Hibernate: insert into USERS (LOGON_ID, PASSWORD, RESETTED, WRNGCOUNT, LOCKED, USERS_ID) values (?, ?, ?, ?, ?, ?) java.lang.ClassCastException at org.hibernate.type.IntegerType.set(IntegerType.java:41)
indicates that there is a problem when inserting (that is: creating) a user object. since it happens in the IntegerType i would guess (can you post the User class) that there is a missmatch of types: in your mapping you specify "int" (that's why IntegerType is used) but the field in your User class has another (java) type (e.g. long, short, byte) ?
btw: often you do not need to specify the type attribute, hibernate picks reasonable valueas for default (e.g. String, int, ...).
if you could post the User class....?
Joined: Jan 22, 2005
Thanks for your help. The problem solved. There was a mis match in the data type.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com