ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

HTTP 404 Error appears randomly when using REST API in SDM

book

Article ID: 212751

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

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>} 

 

Cause

The REST call is being called at the same time the activity log is created

Environment

Release : 17.1

Component : REST API

Resolution

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