Hi there, I'm building an application that will interface with an Oracle 11g database via REST. To start simple I build the GET part of the Country table. But when POSTing a new country a receive a server error 500 due to invalid insertion of NULL. When using Postman the insertion of a new country is successful. I tried changing the export JSON but with no success. Below I added some visuals and debug information. Hopefully someone can help me out. Thanks in advance Beautified from the debugger: MxAdmin REQUEST { "action":"executemicroflow", "params":{ "name":"Stamtabellen.ACT_POSTCounty", "params":{}, "validationGuids":[] }, "changes":{}, "objects":[], "profiledata":{"1544893697275-4":115} } RESULT { "actionResult":null, "commits":[], "changes":{ "11258999068426841":{ "CountryName":{"value":"Inner city"}, "CountyID":{"value":"BA"}, "RegionID":{value":"2"} } }, "resets":{}, "deletes":[], "newpersistable":["11258999068426841"], "objects":[{ "objectType":"Stamtabellen.Country", "guid":"11258999068426841", "hash":"ekgcuwRhRsRt+Da+ybwEbsiGMgX/OyRdzmGPKL1wic4=", "attributes":{ "CountryName":{"value":null}, "CountyID":{"value":null}, "RegionID":{"value":null} } } ] } EDIT: A new record could not be inserted due to null value, although there are no NULL values. Because Oracle is known to be very stringent, I added two custom HTTP headers to the POST call: This resulted in a more sensible Error Msg = ORA-02291: Integrity error (COUNTR_REG_FK) is violated- upper key is not found. So the assumption that Country was a standalone table without references/associations is false. By changing the foreign key "region_id" to a valid value, the data is saved in the country table. Cheers, Zef
asked
Zefanja Kleuters
2 answers
0
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
500 error is one type of Internal server error (overloading ) , The information which you have provided is very good. It is very useful who is looking for selenium online training.