When I see two instances of the same `object` in m...
# announcements
s
When I see two instances of the same
object
in my application, what might be the issue? Seems to be possible
g
Just guessing, but could it be from the different process?
s
That was also my guess, but it really seems to be the same
it's a spring boot application fwiw
multi module
n
Could be Spring creating “beans” by using reflection to invoke private constructors. JUnit 5 has the same bug.
s
yeah something like that. I can see it's being initialized during startup and once again later
h
Different classloaders maybe?
s
@sdeleuze any known issues with
object
?
oh I think I have an idea thanks @hho
you're definitely right, it's being loaded twice with two different classloaders
maybe it's not a known issue because this particular object is being used during the spring init already, which might not be the common scenario
d
Classloading issues can happen when Devtools is enabled
Found that out the hard way
s
Removed them already, not the issue
No you're actually right 🤦‍♂️ I removed them only partially
s
I have not played that much with
object
yet, I mostly used it with Exposed.