-->
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.  [ 2 posts ] 
Author Message
 Post subject: ClassCastException - v3.0.5
PostPosted: Mon Aug 01, 2005 10:14 am 
Newbie

Joined: Sat Jul 30, 2005 10:32 am
Posts: 1
Location: amelia island, florida, usa
the following query executes successfully:
Query q = s.createQuery("select fp from FormatPreference fp");

The following query encounters a CLassCastException:
Query q = s.createQuery("select fp from FormatPreference fp order by fp.StudentID");

09:54:08,722 DEBUG [DotNode] getDataType() : StudentID -> org.hibernate.type.StringType@1302b69
09:54:08,722 DEBUG [FromReferenceNode] Resolved : fp.StudentID -> formatpref0_.StudentID
09:54:08,722 DEBUG [FromReferenceNode] Resolved : fp -> formatpref0_.ID
java.lang.ClassCastException
at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:819)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExprLhs(HqlSqlBaseWalker.java:4326)


I have implemented Serializable in my class.

Any ideas .... thanks Michael[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 10:50 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Does StudentID really of StringType ?

Can you provide your hbm file ?

Seb


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.