-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: EnumType NumberFormatException
PostPosted: Thu Jan 18, 2007 2:30 am 
Newbie

Joined: Wed Jan 17, 2007 9:48 pm
Posts: 9
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.