-->
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.  [ 5 posts ] 
Author Message
 Post subject: problem in crit.list();
PostPosted: Fri Dec 26, 2003 5:11 am 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
There is an exception occur when run crit.list();:
I copy sql to sqlplus, it works well. So I guess the problem is set database field value to class. I reviewed the record in database and not found null value in Numeric field.
I used h2.0.3

java.lang.ClassCastException

at net.sf.hibernate.type.DoubleType.set(DoubleType.java:24)

at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:46)

at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31)

at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:494)

at net.sf.hibernate.loader.Loader.doFind(Loader.java:136)

at net.sf.hibernate.loader.Loader.find(Loader.java:620)

at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:81)

at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3157)

at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:65)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2003 5:13 am 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
By the way my java class type of Numeric field is Double.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2003 7:04 am 
Expert
Expert

Joined: Tue Sep 16, 2003 4:06 pm
Posts: 318
Location: St. Petersburg, Russia
Show your mapping and your class.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 28, 2003 10:17 pm 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
I have resolved this problem.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 4:36 am 
Beginner
Beginner

Joined: Thu Dec 11, 2003 9:54 am
Posts: 25
And what was the solution ?
fafnir wrote:
I have resolved this problem.


-awt


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

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.