Hi,
Been tearing my hair out trying to work out what I'm doing wrong. I'm getting the following
Code:
Caused by: java.lang.NumberFormatException: For input string: "<className>"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.<init>(Integer.java:620)
at org.hibernate.type.IntegerType.stringToObject(IntegerType.java:55)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:300)
where <className> above is the POJO that contains the Enum. I was getting this when I tried to make GenericEnumUserType from
http://www.hibernate.org/272.html implement EnhancedUserType so I tried Gavin King's EnumUserType on the same page but the error persisted (no pun intended).
So, after reading that Annotations contains a EnumType I thought I'd try that, but no joy :(
From previous logging the following method calls are being made:
fromXMLString( value )
objectToSQLString( Enum Object )
fromXMLString( <className>.getName() ) <--- this is where the error is occurring however I'm yet to spot what is actually calling it
I'm using 3.2.1
Any ideas?