-->
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: Hibernate's load() class Can't work well in a cycle Action?
PostPosted: Wed Jul 06, 2005 10:58 pm 
Newbie

Joined: Thu Mar 10, 2005 11:40 pm
Posts: 5
Location: ZhongShan,China
Hi,Good Morning,i have one question:
when I use Hibernate in Struts Action,as following:

(Class)session.load(Class,id)

you know,it can work well,but when I type it as following:
for(...)
{
(Class)session.load(Class,id)
}

it can not work well,tell me:

Unhandled Exception thrown: class java.lang.ClassCastException


So,I want to know,hibernate's Load() can not use in a cycle Action?
or not?

Hibernate version:3.05

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
WARN RequestProcessor:538 - Unhandled Exception thrown: class java.lang.ClassCastException



Name and version of the database you are using:
Sqlserver2000


The generated SQL (show_sql=true):
Hibernate: select linkaction0_.link_id as link1_0_, linkaction0_.link_name as link2_11_0_, linkaction0_.link_url as link3_11_0_, linkaction0_.link_type as link4_11_0_, linkaction0_.link_sortid as link5_11_0_, linkaction0_.userid as userid11_0_, linkaction0_.langid as langid11_0_, linkaction0_.link_picurl as link8_11_0_ from link linkaction0_ where linkaction0_.link_id=?


Debug level Hibernate log excerpt:


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.