Sometimes a HTP 404 occurs when using REST API in SDM
localhost_access_log..txt
/caisd-rest/alg/<ID> HTTP/1.1" 404 17
jrest.log
DEBUG algService ? -----> GET/getObject() for resource 'alg' by (id = <alg id>)
DEBUG SDMCRUDServiceImpl 1214 GetObject URI (http://SDMServer:8050/caisd-rest/alg/<alg id>)
DEBUG SDMCRUDServiceImpl 1402 Query for getObject(): SELECT action_desc,persistent_id,last_mod_dt,description,id,type FROM alg WHERE id = <alg id>
DEBUG SLUMP 861 output_data is
DEBUG DATAGRAM 90 Datagram dg_b->output_data is
DEBUG DATAGRAM 96 Datagram dg_head->output_byte is
DEBUG DAL_JDBC 129 Statement.executeQuery (15ms): SELECT action_desc,persistent_id,last_mod_dt,description,id,type FROM alg WHERE id = <alg id>
ERROR SDMCRUDServiceImpl 1421 No record found for the following query: [SELECT action_desc,persistent_id,last_mod_dt,description,id,type FROM alg WHERE id = <alg id>] {http://SDMServer:8050/caisd-rest/alg/<alg id>}
ERROR SDMCRUDServiceImpl 1421 No record found for the following query: [SELECT action_desc,persistent_id,last_mod_dt,description,id,type FROM alg WHERE id = <alg id>] {http://SDMServer:8050/caisd-rest/alg/<alg id>}
The REST call is being called at the same time the activity log is created
Release : 17.1
Component : REST API
Add a 30 seconds delay to avoid consuming the object immediately after creation and allow SDM to insert and refresh the object data. This can avoid the 404 error messages