-->
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.  [ 4 posts ] 
Author Message
 Post subject: more than 2000 parameter markers issue
PostPosted: Fri Oct 21, 2011 10:08 am 
Regular
Regular

Joined: Fri Jul 30, 2004 4:02 pm
Posts: 50
Hey all,
I'm using Hibernate Search to do some nice analytical/searching work, but ran into a bug.

Using facets, I get back all the information I originally need based on a lucene query, but when I try to get the associated objects (javax.persistence.Query.getResultList()) I get "Prepared or callable statement has more than 2000 parameter markers." on sql server/jtds.

Trimming for smaller results under 2k works fine, but since I'm using hibernate search intentionally on larger results (because, hey, it's faster than the RDBMS for string style searching/analytics) I was hoping it would be easy to then use the results in a normal/standard (JPA/entity list) way. Paginating the results does not seem to matter, as it appears it is more the size of the resulting SQL query based on the results of the Search query.

I see a https://hibernate.onjira.com/browse/HHH-1123 that has been open since 2005 related to Oracle issue, with references to similar problem on sql server. Has anyone had luck overcoming this problem?

HibSearch 3.4.1.final, hibernate-entitymanager 3.6.7.final

thanks,
-D


Top
 Profile  
 
 Post subject: Re: more than 2000 parameter markers issue
PostPosted: Thu Oct 27, 2011 4:46 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

could you provide a full stack trace and the search you are trying to execute? Maybe also the SQL which should be executed. This would help to track down the code path. Obviously you are hitting a limitation of your database and there is of course the Hibernate Core issue you are mentioning. However, I thought we do some batching on the Search side, but I need some more information to track this down.

Have you considered using projections as solution/workaround?

--Hardy


Top
 Profile  
 
 Post subject: Re: more than 2000 parameter markers issue
PostPosted: Thu Oct 27, 2011 5:49 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
I created a new issue for that - https://hibernate.onjira.com/browse/HSEARCH-962


Top
 Profile  
 
 Post subject: Re: more than 2000 parameter markers issue
PostPosted: Thu Oct 27, 2011 6:04 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
BTW fixing the code should be fairly trivial, it is all in https://github.com/hibernate/hibernate- ... lizer.java

If you want to give it a try let us know and jump to your GitHub fork :)

_________________
Emmanuel


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