I have a java project in intellij-idea. I am using gradle to build it. Recently I have added dependency for spring boot actuators and since then I am getting this error on startup:
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at JPLISAgent.c line: 844
My application is still running after that but I would like to get rid of this error.
I was trying to find the answer on google but I was not able to find any.
I would appreciate any help. Thank you.
Maybe not directly related to your problem, because mine had nothing to do with the Spring Boot Actuator
, but maybe it might help someone else.
My problem occurred while I was testing my REST controllers. I do not provide DTOs but return my entities directly. I also have a bidirectional One-To-Many
relationship between Parent
and Child
. The GET
was producing application/json
as MediaType
.
@Entity
public class Parent {
...
@OneToMany(mappedBy = "parent")
private Set<Child> children;
...
}
@Entity
public class Child {
...
@ManyToOne
@JoinColumn(name = "PARENT_ID", referencedColumnName = "ID")
private Parent parent;
...
}
If I use my entities like this and was querying e.g. for a parent by id the JSON implementation was triggering a recursion between Parent
and Child
, but eventually returned with a value to my test.
To solve this problem I just added a @JsonIgnore
to the parent field. Which in this case was sufficient for my requirements.
@Entity
public class Child {
...
@ManyToOne
@JoinColumn(name = "PARENT_ID", referencedColumnName = "ID")
@JsonIgnore
private Parent parent;
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With