JDBC calling stored procedure with OUT params get mixed up
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**Mark L** ([Bug 66027](https://bz.apache.org/bugzilla//show_bug.cgi?id=66027&redirect=false)):
I am using JMeter JDBC Request to call a stored procedure with OUT parameters.
My JDBC Request is defined as follows:
Query Type: Callable Statement
Query: CALL XXX_schema.YYY_stored_proc(?,?,?,?)
Parameter Values: "{}",null,null,null
Parameter Types: IN CLOB,OUT CHAR,OUT CHAR,OUT VARCHAR
Variable Names:JSON_CLOB,Status,Error_Code,Error_Message
Result variable name: result
Handle ResultSet: Store As Object
In this configuration I am expecting the stored procedure to reply with an error!
Looking in View Results Tree at my step, I see the the following in Response Body:
Output variables by position:
[2] PRECHKFAIL
[3] E
[4] Division Not Valid. Pre-Check failed. Get URs process was not completed.
Looking in Debug Sampler, I see the following Variables:
Error_Code=Division Not Valid. Pre-Check failed. Get URs process was not completed.
Error_Code_#=0
Error_Message_#=0
JSON_CLOB=PRECHKFAIL
JSON_CLOB_#=0
Status=E
Status_#=0
This does not seem to line up. In position 2, I defined the variable "Status", so I am expecting to see:
Status=PRECHKFAIL
Status_#=0
Similarly for Error_Code in position 3, and Error_Message in position 4:
Error_Code=E
Error_Code_#=0
Error_Message_#=0
Error_Message=Division Not Valid. Pre-Check failed. Get URs process was not completed.
Further, my variable "JSON_CLOB" should be unmodified, since this is defined as an IN param.
Lastly, I am still checking with my developers, but I believe the positions of variables 2 and 3, in the Response Body are reversed.
Severity: normal
OS: All
Contributor guide
Assessment
This issue has not been assessed yet.