Question

Unexpected internal server error occurred in Integration

  • 14 September 2023
  • 2 replies
  • 76 views

Badge

Is there any limitation for having nested List of Structures in REST API Integration

 

Like below

 

In above image each AnalysisNo object within AnalysisNo array have inner array called DataPoints, 


when I'm having the inner array I'm getting the below error, but when I tried to execute that function in PLSQL its executed without any error


without that Inner array it works fine as below

 

Is there a limitation like this or any workaround for this?

 

Below are the projection function and the structures

 


2 replies

Userlevel 7
Badge +31

Hi @faiyazrafeek,

According to the documentation, it is possible. I think the problem is that you have defined the nested structure as another ‘attribute’, instead of an ‘array’. Following documentation might help you update the structure as appropriate:

https://docs.ifs.com/techdocs/23r1/060_development/022_user_interface/030_aurena_dev/130_aurena_component_reference/110_projection_controls/entity/#example_1_entity_with_attributes_arrays_and_references

Documentation on Strucrues:

https://docs.ifs.com/techdocs/23r1/060_development/022_user_interface/030_aurena_dev/130_aurena_component_reference/110_projection_controls/structure/

Hope this helps!

Userlevel 6
Badge +12

Hi,
same issue here.
Nested list throws this error, but only in function, when I use action it works well.

 

@Override
entity InMessage {
crud = Read, Create;

array InMessageLines(MessageId) to InMessageLine(MessageId);
}

structure InMessageStr using InMessage {
nestedwithcrud = Create, Read;
}

//works OK
action GetInMessage Structure(InMessageStr) {
initialcheck none;
parameter MessageId Integer;
}

//throws error
function GetInMessage Structure(InMessageStr) {
parameter MessageId Integer;
}



FUNCTION Get_In_Message___ (
message_id_ IN INTEGER) RETURN In_Message_Str_Rec
IS
BEGIN
RETURN Get_In_Message_Str_Rec___(message_id_);
END Get_In_Message___;


 

    "response": {
"status": {
"code": "500",
"info": "Internal Server Error"
},
"headers": {
"OData-Version": "4.0",
"Content-Type": "application/json"
},
"body": "{\"error\":{\"code\":\"UNEXPECTED\",\"message\":\"Unexpected internal server error occurred.\"}}"
},
"server": {
"stacktrace": {
"exceptions": [
{
"class": "java.lang.NullPointerException",
"message": null,
"invocation": {
"class": "com.ifsworld.fnd.storage.invoker.FunctionReaderBuilderImpl",
"method": "getRequestBuilder",
"line": 502
}
}
],


BR
Filip​​​​​​​

Reply