Errors creating context beans with a factory bean #5041
Unanswered
tobiasschaefer
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Most likely cause is some kind of undetected circular reference causing contention in the synchronised map that holds the beans but without a reproducer hard to say |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We first had a context bean like this:
and later replaced this with
which should be the same, right?
Strangely, the change lead randomly to either build success, very long builds or even OutOfMemory on Github Actions. In the matrix build we only observed errors for JDK 8 (JDK 11 and 15 worked) but this could coincidence. We're using the latest Micronaut 2.3.3.
This is the commit that broke it: camunda-community-hub/micronaut-camunda-platform-7@da8be6d (there are some unrelated changes in there).
This is the commit that fixed it again: camunda-community-hub/micronaut-camunda-platform-7@b9ac02f
It seems that the instantiation of the beans is non-determinstic and that there is some kind of recursion. Depending on the order it either succeeds, takes long or even fails.
I know there is a simple workaround for us but this cost us several hours and others might run into the same issue. Especially, the sporadic failures make it hard to isolate.
Any thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions