Skip to content
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

json_proc_param_out_cursor example from rest-sql/demo-all-in-one.html blame on "Parameter Type Conflict" #26

Open
vitaly-zverev opened this issue Jul 3, 2019 · 2 comments

Comments

@vitaly-zverev
Copy link

Trying ORDS 19.1 in front of Oracle EE 12.1.0.2 with rest-sql/demo-all-in-one.html samples.
Got this in reply:
{
"env": {
"defaultTimeZone": "GMT"
},
"items": [
{
"statementId": 1,
"statementType": "sqlplus",
"statementPos": {
"startLine": 1,
"endLine": 1
},
"statementText": "exec ADHOC_PROC_SIMPLE_OUT_CURSOR(?)",
"response": [
"\nError starting at line : 1 in command -\nBEGIN ADHOC_PROC_SIMPLE_OUT_CURSOR(:adhocbind1); END;\nError report -\nParameter Type Conflict\n"
],
"errorCode": 17012,
"errorLine": 1,
"errorColumn": 0,
"errorDetails": "Parameter Type Conflict",
"result": 0,
"binds": [
{
"index": 1,
"data_type": "CURSOR",
"mode": "out",
"result": null
}
]
}
]
}

@vitaly-zverev
Copy link
Author

vitaly-zverev commented Jul 4, 2019

Perhaps ORDS use wrong casting in java for parameter of OracleTypes.CURSOR type.
Next example in place of json_proc_param_out_cursor:

VARIABLE refcur REFCURSOR
exec ADHOC_PROC_SIMPLE_OUT_CURSOR(:refcur);
PRINT refcur
/

works like a charm:

{
"env": {
"defaultTimeZone": "GMT"
},
"items": [
{
"statementId": 1,
"statementType": "sqlplus",
"statementPos": {
"startLine": 1,
"endLine": 1
},
"statementText": "VARIABLE refcur REFCURSOR",
"response": [],
"result": 0
},
{
"statementId": 2,
"statementType": "sqlplus",
"statementPos": {
"startLine": 2,
"endLine": 2
},
"statementText": "exec ADHOC_PROC_SIMPLE_OUT_CURSOR(:refcur)",
"response": [
"\nPL/SQL procedure successfully completed.\n\n"
],
"result": 0
},
{
"statementId": 3,
"statementType": "sqlplus",
"statementPos": {
"startLine": 3,
"endLine": 3
},
"statementText": "PRINT refcur",
"response": [
"\n",
"\nCOL1 \n--------------------\ninside outproccursor\n\n\n"
],
"result": 0
},
{
"statementId": 4,
"statementType": "sqlplus",
"statementPos": {
"startLine": 4,
"endLine": 4
},
"statementText": "/",
"response": [],
"result": 0
}
]
}

@vitaly-zverev
Copy link
Author

May be OracleCallableStatement did a trick in place of CallableStatement.
It would be nice to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant