Skip to main content
Question

Unexpected internal server error occurred in Integration

  • September 14, 2023
  • 3 replies
  • 277 views

Forum|alt.badge.img

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

 

3 replies

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+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!


InfFilipV
Hero (Partner)
Forum|alt.badge.img+12
  • Hero (Partner)
  • 199 replies
  • April 4, 2024

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


Forum|alt.badge.img+1
  • Do Gooder (Partner)
  • 2 replies
  • June 18, 2024

Hi guys,

I am taking the virtual blended sessions for Integration API Development training and just got the same issue, with actions I can save structures with inner arrays, with functions I always get internal error message when I try to query a structure with an array. Were you able to figure this out?

If I comment the array line in the Overridden entity the Query works just fine.

 

Thanks for any info.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings