-->
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: Problem with custom type and SQL SERVER
PostPosted: Thu Mar 10, 2005 3:11 pm 
Beginner
Beginner

Joined: Tue Dec 21, 2004 11:53 am
Posts: 42
Hibernate version:2.1.6


Hello there! I'm following the receipt for enums and hibernate as shown on http://www.hibernate.org/203.html I've created all classes as described.
Well, then I have a class YesNoEnum that extends PersistentCharacterEnum.
When trying to save an object it throws :
Code:
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to determine the type of the specified object.
   at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
   at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
   at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source)
   at com.araujo.convenios.model.enum.PersistentEnum.nullSafeSet(PersistentEnum.java:276)
   at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118)
   at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393)
   at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:507)
   ... 24 more



What's odd is that I've already tried the same code with mySQL with no problems at all.

Could someone help me out?


Thanks all

Vinicius


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.