Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay with SQL Server : The server supports a maximum of 2100 paramet
Hi,I am using Liferay 6.2 CE GA6 with MS SQL Server 2016 and while execution of queries I am encountered with following error:
[http-bio-8080-exec-12][JDBCExceptionReporter:82] The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
There are different solutions suggested in forums to divide the queries in multiple chunks of parameters less than 2000.But this doesn't fulfill my objective because I need to group the results of query at the end.Please suggest if there is any solution for this with in Liferay Dynamic Query and RestrictionsFactoryUtil. or any other solution within JAVA which can be integrated with liferay dynamic query.
Thanks
[http-bio-8080-exec-12][JDBCExceptionReporter:82] The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
There are different solutions suggested in forums to divide the queries in multiple chunks of parameters less than 2000.But this doesn't fulfill my objective because I need to group the results of query at the end.Please suggest if there is any solution for this with in Liferay Dynamic Query and RestrictionsFactoryUtil. or any other solution within JAVA which can be integrated with liferay dynamic query.
Thanks
That's a sql server limitation, how SB does it or how Hibernate does it or even how you might code in DQ or a custom query, none of these matter.
Any statement like "WHERE id IN (?)" with a list of 2101 ids is going to trigger this message, regardless of how it is presented through JDBC. Even if you were to convert that to a string ala "WHERE id IN (1,2,3,4...)", you'd still hit this message.
That's why you see the recommendations about chunking. It keeps you under the limitation imposed by SQL Server itself.
Any statement like "WHERE id IN (?)" with a list of 2101 ids is going to trigger this message, regardless of how it is presented through JDBC. Even if you were to convert that to a string ala "WHERE id IN (1,2,3,4...)", you'd still hit this message.
That's why you see the recommendations about chunking. It keeps you under the limitation imposed by SQL Server itself.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™