Hi Comunity,

When i use the ivy.repo.save to save my business data. I got an error as below:

java.lang.StackOverflowError JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: java.util.ArrayList[0]->ch.ivyteam.ivy.security.internal.Role["users"]->ch.ivyteam.ivy.persistence.client.PersistentClientObjectList[0]->ch.ivyteam.ivy.security.internal.User["allRoles"]->.....

IvyRuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: java.util.ArrayList[0]->ch.ivyteam.ivy.security.internal.Role["users"]->ch.ivyteam.ivy.persistence.client.PersistentClientObjectList[0]->ch.ivyteam.ivy.security.internal.User["allRoles"].....

IvyScriptMethodInvocationException: Error calling method save(Object) on an object of class ch.ivyteam.ivy.business.data.store.internal.BusinessDataRepositoryImpl.

IvyScriptRuntimeException: IvyScript Runtime Exception in

Could any one help me to explain why it happen and how to solve it? Thanks

asked 04.05.2020 at 06:24

pttung's gravatar image

accept rate: 0%

You are trying to persist a collection of ivy-core user objects. And these are long recursive trees. Which even lead to a stack overflow if you try to serialize them.

However, normally this happens by an accident when designing your Data. And I'd simply remove that object from the object tree before serializing. I didn't test it but think that either by removing 'persist' flags on the DataClass or if you are persisting a normal java object, just mark the field and it's getters with @JsonIgnore. See https://dev.axonivy.com/doc/8.0/designer-guide/data-modeling/business-data.html#field-without-get-setter


answered 04.05.2020 at 13:46

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

edited 06.05.2020 at 07:34

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 04.05.2020 at 06:24

Seen: 340 times

Last updated: 06.05.2020 at 07:34