-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MssqlNonTransientException: Procedure or function has too many arguments specified. #276
Comments
For me, the error is the following (real parameter names renamed):
BUT, the query in question does not even specify the |
I can confirm this and it must have be introduced between |
Hi! I attempted to investigate the code diffs and my eyes looked at this diff for some reason: Commit: 4781ad7 The default constructor was removed. I am not sure if this was used in some scenario that I couldn't find? Also, the io.r2dbc.mssql.IndefinitePreparedStatementCache looks interesting. I could not find good references in code that would explain the issue at hand but my hunch is that it might have something to do with the bug. I could also be completely off the track 😆 Hope these help. |
Have you any fix for this issue please ? |
I have located this issue, from 1.0.1.RELEASE, in line 357 of MssqlConnectionConfiguration.java: private Predicate preferCursoredExecution = sql -> false; has been changed: private Predicate preferCursoredExecution = DefaultCursorPreference.INSTANCE; it results that ParametrizedMssqlStatement run to line 255 of RpcQueryMessageFlow: emit = handleSpCursorReturnValue(statementCache, codecs, query, binding, state, needsPrepare, returnValue); then get this error. I saw in main branch has fixed some similar issues, it added some codes for retry mechanism, unfortunately it only retry errorNumber == 8179 || errorNumber == 586 , but I encountered error number 8144 and 8178, this bug report should the error number is "8144 | 16 | No | Procedure or function %.*ls has too many arguments specified." My suggestion is no matter what error number encounter, all retry one more time, it would solve most errors, no worried about infinite loop, because retryReprepare.compareAndSet(true, false) only retry one more time. so my suggestion is to remove "isPreparedStatementNotFound(((ErrorToken) message).getNumber())" from line 265 or add "|| errorNumber == 8144 || errorNumber == 8178" to line 307 of RpcQueryMessageFlow.java, the current bug will be gone. |
agree kantharajnr's comment follow #273. this is my current solution as well. "Downgrading r2dbc-pool to 1.0.0.RELEASE resolved error related MssqlNonTransientException: The parameterized query has been resolved." |
Signed-off-by: Adam Gong [email protected]
r2dbc#276 r2dbc#273 Signed-off-by: Adam Gong <[email protected]>
If you really want to use the 1.0.1.RELEASE or 1.0.2.RELEASE version instead of waiting for a new version to be released. The following solutions can fix this problem (skip this pit):
@configuration
}
@configuration
}
|
Reverting r2dbc-pool to 1.0.0.RELEASE did not address the original issue. While downgrading r2dbc-mssql to 1.0.0.RELEASE resolves the problem in read mode, "Transaction names must contain only characters and numbers and must not exceed 32 characters." |
@LabziziKader I also encountered this issue, but it was gone when I downgraded the spring-boot-starter-parent to version 3.1.0. and all of r2dbc-mssql / r2dbc-pool/ r2dbc-spi to 1.0.0.RELEASE. If your problem persists, I'll try to find out why. |
Thanks @adamgongca for proposition. |
@adamgongca Thanks for your response here, I seems to work well when using |
Is there already a solution for this problem? |
Bug Report
Versions
Current Behavior
Bumped r2dbc-mssql from 1.0.0.RELEASE to 1.0.2.RELEASE (via springboot 3.1.2) generates the following exception at runtime:
Implementation unchanged where both parameters are never null.
Expected behavior/code
Running as 1.0.0.RELEASE (no exceptions)
Possible Solution
Additional context
Looks related to #271
The text was updated successfully, but these errors were encountered: