-->
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.  [ 6 posts ] 
Author Message
 Post subject: Stackoverflow on too large ParameterList
PostPosted: Thu Jan 26, 2012 9:30 am 
Newbie

Joined: Thu Jan 26, 2012 9:26 am
Posts: 4
Hi All!

I have a serious problem: the ParameterList variable in my HQL has 10k+ elements, so Hibernate can't work with it (stackoverflow), now i'm trying to convert it into DetachedCriteria query, but it's look like this:

Code:
final StringBuffer hql = new StringBuffer(
        "SELECT new db.XXXTable(c.abc1, c.abc2, c.abc3, a.def1, a.def2, a.def3, a.def4, a.def5, a.def6, a.def7, a.def8) FROM def AS a, abc AS c WHERE a.def7 IN (:ids) AND a.def7 =c.abc1 AND a.def9 = TRUE ");

session = getSession();
final Query query = session.createQuery(hql.toString());

query.setParameterList("ids", importIdList);
result = query.list();


db.XXXTable has his own constructor.

I saw that maybe the DetachedCriteria query can handle this (10k+ elements in the ParameterList), but i can't figure it out, how to use it on this (from two tables into a unique class selection...)

But if someone know how to solve the stackoverflow error, it would be also helpfull!

Thank you very much!


Top
 Profile  
 
 Post subject: Re: Stackoverflow on too large ParameterList
PostPosted: Fri Jan 27, 2012 8:06 am 
Newbie

Joined: Thu Jan 26, 2012 9:26 am
Posts: 4
The Hibernate version in my MAVEN Repo is: org.hibernate: hibernate-core 3.3.2 GA


Top
 Profile  
 
 Post subject: Re: Stackoverflow on too large ParameterList
PostPosted: Mon Jan 30, 2012 4:22 am 
Newbie

Joined: Thu Jan 26, 2012 9:26 am
Posts: 4
Hibernate forum... Y U NO answer? :(


Top
 Profile  
 
 Post subject: Re: Stackoverflow on too large ParameterList
PostPosted: Mon Jan 30, 2012 9:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 11, 2009 2:26 am
Posts: 29
stacktrace?


Top
 Profile  
 
 Post subject: Re: Stackoverflow on too large ParameterList
PostPosted: Mon Jan 30, 2012 11:44 am 
Newbie

Joined: Mon Jan 30, 2012 9:09 am
Posts: 5
voriand wrote:
Hibernate forum... Y U NO answer? :(


I realized that now, It is not wise to count for help on this forum... most of the questions have one or two additional post by creators.
Good luck.


Top
 Profile  
 
 Post subject: Re: Stackoverflow on too large ParameterList
PostPosted: Mon Jan 30, 2012 12:36 pm 
Newbie

Joined: Thu Jan 26, 2012 9:26 am
Posts: 4
Okay, i figured it out... I upgraded Hibernate manually to version 3.6.9. This version can handle 10k+ elements in the parameterList, but it's very slow indeed... So the solution is: upgrade.


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