Comments (12)
I need to have a look. Thanks for the reproducer.
from r2dbc-mssql.
@mp911de Any news on this? After upgrading to the current Spring Boot Release we experience the same error. Some other tests suddenly run into
Caused by: io.r2dbc.mssql.ExceptionFactory$MssqlNonTransientException: The parameterized query '(@P0_name nvarchar(4000))SELECT attachment.id, attachment.name, ' expects the parameter '@P0_name', which was not supplied.
If I just pin the driver at 1.0.0.RELEASE
again everything works fine.
from r2dbc-mssql.
Same as I commented here a couple of days ago, should perhaps have created an issue like this. Thanks for reporting it as a separate issue @radovanradic !
from r2dbc-mssql.
@SimenRokaas Can you attach debug logs for the io.r2dbc
logger?
from r2dbc-mssql.
Sure
DEBUG io.r2dbc.pool.ConnectionPool - Obtaining new connection from the pool
DEBUG io.r2dbc.mssql.SimpleMssqlStatement - [cid: 0x9] Start direct exchange for SELECT 1
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] exchange()
DEBUG io.r2dbc.mssql.QUERY - [cid: 0x9] Executing query: SELECT 1
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] exchange(subscribed)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Initiating exchange
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Request: SQLBatch [sql="SELECT 1"]
DEBUG io.r2dbc.pool.ConnectionPool - Obtaining new connection from the pool
DEBUG io.r2dbc.mssql.MssqlConnection - [cid: 0xa] Creating statement for SQL: [SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses)]
DEBUG i.r.mssql.ParametrizedMssqlStatement - [cid: 0xa] Start cursored exchange for SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses) with fetch size 128
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] exchange()
DEBUG io.r2dbc.mssql.QUERY - [cid: 0xa] Executing query: SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] exchange(subscribed)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Initiating exchange
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Request: RPCRequest [procName='null', procId=4, optionFlags=io.r2dbc.mssql.message.token.RpcRequest$OptionFlags@6387756e, statusFlags=0, parameterDescriptors=[RpcInt [name='null', value=1073741825], RpcInt [name='null', value=0], RpcInt [name='null', value=4], RpcInt [name='null', value=8193], RpcInt [name='null', value=0], EncodedRpcParameter [name='P0_statuses', value=io.r2dbc.mssql.codec.CharacterEncoder$NvarcharEncoded@6a675284]]]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: ColumnMetadataToken [columns=[Column [name='", type=MutableTypeInformation [maxLength=4, lengthStrategy=FIXEDLENTYPE, precision=10, displaySize=11, scale=0, flags=32, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null], table=null]]]
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0x9] Creating new result
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: io.r2dbc.mssql.message.token.RowToken@122095d5
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: DoneToken [done=true, hasCount=true, rowCount=1, hasMore=false, attnAck=false, currentCommand=0]
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0x9] Incoming row count: DoneToken [done=true, hasCount=true, rowCount=1, hasMore=false, attnAck=false, currentCommand=0]
DEBUG io.r2dbc.pool.PooledConnection - Releasing connection
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Conversation complete
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ErrorToken [number=8179, state=4, infoClass=16, message='Could not find prepared statement with handle 1073741825.", serverName='a11e255015a3", procName='", lineNumber=16777216]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Warning: Code [8179] Severity [GENERAL_ERROR]: Could not find prepared statement with handle 1073741825.
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0xa] Creating new result
DEBUG i.r.mssql.util.FluxDiscardOnCancel - received cancel signal
DEBUG io.r2dbc.pool.PooledConnection - Releasing connection
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnStatus [status=8179]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnValue [ordinal=1, parameterName='', value=PooledSlicedByteBuf(ridx: 0, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 209, widx: 209, cap: 256)), type=MutableTypeInformation [maxLength=4, lengthStrategy=BYTELENTYPE, precision=10, displaySize=11, scale=0, flags=0, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null]]
DEBUG io.r2dbc.mssql.RpcQueryMessageFlow - CursorId: 0
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnValue [ordinal=4, parameterName='', value=PooledSlicedByteBuf(ridx: 0, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 209, widx: 209, cap: 256)), type=MutableTypeInformation [maxLength=4, lengthStrategy=BYTELENTYPE, precision=10, displaySize=11, scale=0, flags=0, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null]]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: DoneProcToken [done=true, hasCount=false, rowCount=0, hasMore=false, attnAck=false, currentCommand=224]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Conversation complete
from r2dbc-mssql.
I think there has been a bug for a longer period of time that now gets visible with the changed cursoring behavior. The JDBC driver attempts a re-prepare upon errors 8179 and 586.
This is what we should attempt as well.
from r2dbc-mssql.
We now attempt a reprepare when encountering a no prepared statement response from the server. Please retry against the latest 1.0.2
snapshots, available from http://oss.sonatype.org/content/repositories/snapshots.
from r2dbc-mssql.
@mp911de OK, I cannot reproduce the "handle error" any more. Our tests fail with 1.0.2.BUILD-SNAPSHOT nevertheless. The problem seems to have something to do with concurrency though. If I run the failing tests by themselves they run fine. If I run everything in bulk I (for example) end up with
Caused by: io.r2dbc.mssql.ExceptionFactory$MssqlNonTransientException: The parameterized query '(@P0_name nvarchar(4000))SELECT attachment.id, attachment.name, ' expects the parameter '@P0_name', which was not supplied.
for example. Any suggestions what could go wrong here? Again: 1.0.0.RELEASE
is fine.
from r2dbc-mssql.
@kschlesselmann can you please file a new ticket along with a minimal reproducer?
from r2dbc-mssql.
@mp911de OK. I'm afraid that'll be not so easy but let's see.
from r2dbc-mssql.
I have this issue as mentioned in #248 (comment). With the latest SNAPSHOT in use the error is gone.
from r2dbc-mssql.
I see a similar "Connection closed" exception (sometimes). Running version 1.0.2.RELEASE
and disabled cursored execution.
from r2dbc-mssql.
Related Issues (20)
- Transaction Names should be truncated when too long. HOT 3
- How to execute store procedure? HOT 1
- Ensure that`PreferredCursorExecution` is the only configuration flag to control cursor preference HOT 5
- Support for TVP HOT 1
- Add ActiveDirectoryServicePrincipal authentication mechanism HOT 1
- Release 1.0.1.RELEASE
- Capture encoder in `Encoded` instead of the plain value
- Mixed up statements when pool is enabled HOT 18
- Release 1.0.2.RELEASE
- Upgrade to Reactor 2022.0.9
- MssqlNonTransientException: Procedure or function has too many arguments specified. HOT 12
- Can you tell me the url of Microsoft SQL Server client protocol ? please HOT 2
- Add support for java.time.Instant HOT 5
- Memory leak detected while using r2dbc-mssql 1.0.2 HOT 2
- Intermittent same queries is taking more time. HOT 2
- Support Azure Managed Identities to authenticate to Azure SQL DB HOT 1
- Insert multiple rows as single statement
- Created by mistake, can you delete this issue please.
- Could not find prepared statement with handle HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2dbc-mssql.