Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORDS Issue in Oracle 12.1

user8632739Jun 22 2022 — edited Jun 26 2022

I have executed below with JSON on my 12.1.0.2 database but receiving below error. Looks like 12.1 doesn't support JSON. Could you please let me know what is this error code ? I am not able to get proper resources from internet regarding this.
Oracle Version 12.1 but the same one is working in Oracle 12.2 version
With content type SQL it is working perfectly

[oracle@cbq2-svd-testdb1 ~]$ curl -k -X POST https://test:8445/ -u testapi:testapi -d "exec dbms_workload_repository.create_snapshot();" -H "Content-Type: Application/sql"|jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 324 0 276 100 48 103 18 0:00:02 0:00:02 --:--:-- 104

{
"env": {
"defaultTimeZone": "GMT+03:00"
},
"items": [
{
"statementId": 1,
"statementType": "sqlplus",
"statementPos": {
"startLine": 1,
"endLine": 1
},
"statementText": "exec
dbms_workload_repository.create_snapshot()",
"response": [
"\nPL/SQL procedure successfully completed.\n\n"
],
"result": 0
}
]
}

###################### Not working with content type JSON ##########

[oracle@test-svd-testdb1 ~]$ curl -k -X POST https://test:8445/ -u testapi:testapi -d "test_exec.json" -H "Content-Type: Application/json"|jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 424 100 410 100 14 2042 69 --:--:-- --:--:-- --:--:-- 2146

{
"code": "BadRequest",
"title": "Bad Request",
"message": "An error occurred parsing the SQL script ",
"o:errorCode": "ORDS-24000",
"cause": "An error with the following message occurred:
Problem recognizing JSON",
"action": "Ensure the SQL script is well-formed",
"type": "tag:oracle.com,2020:error/BadRequest",

}
}

Validated the JSON file and it is properly formated.
[oracle@cbq2-svd-testdb1 ~]$ cat test_exec.json|jq

Comments

gimbal2
Well look again, because it is on there. Java SE 7 documentation with a nice fat download button next to it.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

As for sources, there is (and always has been) the src.zip in the JDK directory after installation which is the source code for the standard API. To get the full JDK source you need to get the OpenJDK project source.

the bottom link called "More downloads" does not work and produces a "not found" error.
Its futile to mention such things; you're not taking to Oracle employees here (except for very rare occasions). Perhaps in the forum to report download problems you might have some success:

3038
922141
Thank you very much! -- I missed that for some reason.
However the docs are one minor version behind at 7.4 (JDK is 7.5) and the source code is only available there for version 6 and not version 7. Or have I again overlooked something obvious?
gimbal2
919138 wrote:
However the docs are one minor version behind at 7.4 (JDK is 7.5) and the source code is only available there for version 6 and not version 7. Or have I again overlooked something obvious?
7.5 is only a bugfix release, 7.6 is going to be the next "feature release". That would probably explain why nobody bothered to upload a new javadoc.

An old rule of Sun used to be that the API wouldn't change with minor updates though; I'm not sure how much of that is true now that Oracle is in charge. In any case I wouldn't worry too much about the minor version number of the javadocs - the information pertains to "java 7", not "java 7 update X".
1 - 3

Post Details

Added on Jun 22 2022
4 comments
429 views