To summarize how to read the stack traces to find the problem as done in the question’s comments:
If you find an entry like
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:82)
- waiting to lock <0x0000000582e56bc8> (a java.lang.Class for com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector)
within your stack trace you know that the thread is trying to lock an object instance which is represented by the number 0x0000000582e56bc8
and the text in the braces tell you further that this object is the Class
instance representing the runtime class AccessorInjector
.
Since this class object represent the class that is declaring the method it is possible that the method is a static synchronized
method but it is also possible that the method contains a construct like synchronized(AccessorInjector.class)
.
So you have to find a thread whose stack trace contains a matching - locked
entry to learn which threads blocks the others.
Since you found the match as
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:85)
- locked <0x0000000582e56bc8> (a java.lang.Class for com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector)
we see that the thread which has locked the object is executing the same method as the waiting threads so everything turn out to be plausible if this method is synchronized
or contains a synchronized(AccessorInjector.class)
block.
It’s the invariant property of Java’s intrinsic locks that only one thread can proceed with having the object locked while an arbitrary number of other threads must wait.