N/A error in connector output

AntoninoProva

Member
hi, I tried to take this json file as output from the connector in the screenshot to iterate it via module request, but I get the following error if I try to output it, how do I solve it?


{
"status": "ERROR",
"message": "ServiceRequest prova_conn_banca: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: com.fasterxml.jackson.databind.MappingJsonFactory[\"codec\"]->com.fasterxml.jackson.databind.ObjectMapper[\"factory\"]-
...
...
...
>com.fasterxml.jackson.databind.MappingJsonFactory[\"codec\"]->com.fasterxml.jackson.databind.ObjectMapper[\"factory\"]->com.fasterxml.jackson.databind.MappingJsonFactory[\"codec\"]->com.fasterxml.jackson.databind.ObjectMapper[\"factory\"])",
"exception": "Exception",
"timeStamp": "2023-10-02T12:23:06.573+0200",
"userDefinedErrorText": ""
}
 

Attachments

  • evvove.png
    evvove.png
    112.8 KB · Views: 6
Is this a default groovy scripting component? Custom Request > New > Script?

If so It looks like you're modifying the area of the script "template" with another string input?

I never ever touch the script outside of the imports up top, and then within the area containing the scripting comments. When you mess with the structure of the function you start to see weird things.

I think you need to hire a consultant to get you the last mile, or ask ChatGPT to write you a script from scratch. (it is VERY good at writing groovy). I think there's some need for you to grasp some fundamentals that we can't answer in a reasonable amount of time or effort in forum.

DO NOT TOUCH the following blocks of code:
Code:
HashMap<String, Object> main(OrchestrationAttributes orchAttr, HashMap inputMap)

{

  HashMap<String, Object> returnMap = new HashMap<String, Object>();

and

Code:
  return returnMap;
}

Instead, put all lines of code in the template. Follow the prompts built into the template via comment. I added "Add imports here" but the rest is default


Code:
import com.oracle.e1.common.OrchestrationAttributes;
import java.text.SimpleDateFormat;
// Add imports here

HashMap<String, Object> main(OrchestrationAttributes orchAttr, HashMap inputMap)
{
  HashMap<String, Object> returnMap = new HashMap<String, Object>();
  // Add logic here
  // String stringVal = (String)inputMap.get("inputStringVal");
  // BigDecimal numVal = new BigDecimal((String)inputMap.get("inputNumVal"));
  // SimpleDateFormat format = new SimpleDateFormat(orchAttr.getSimpleDateFormat());
  // Date dateVal = format.parse((String)inputMap.get("inputDateVal"));

  // orchAttr.writeWarn("custom log entry - warning");
  // orchAttr.writeDebug("custom log entry - debug");

  // def array = '[{"Column1":"val1","Column2":"val2"},{"Column1":"val3","Column2":"val4"}]';
  // returnMap.put("Output Array", array);
  // returnMap.put("Output String", stringVal);

  return returnMap;
}
 
Hi,

That looks like the groovy template for a database connector, not a REST connector. I would agree with @DaveWagoner, you should likely hire a consultant to help you with this piece.

Kevin
 

Similar threads

Replies
0
Views
956
glorfindel
Replies
1
Views
996
DaveWagoner
DaveWagoner
Replies
0
Views
808
Chandra Chaganti
Replies
10
Views
1K
Stank1964
Back
Top