• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with matching field types in Sybase to Mapping file.

 
Madhu Kumar Vatts
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error:

java.lang.ClassCastException
at net.sf.hibernate.type.ShortType.set(ShortType.java:30)

I know why it is occuring...but trying to figure out how to resolve it

I have a field x in sybase with field type small int
I map it to a field in hibernate mapping file using java.lang.short(Middlegen gives me this). Also I use a value object in which the field is short.

Any one can give me what would be an appropriate field type in java for small int field in sybase.

Thanks for your time
Madhu
 
Madhu Kumar Vatts
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have resolved the problem...Its short only...The value object had a typo with string instead of short.

Thanks
Madhu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic