Because the application is multithreaded and the error is occuring at high load-times, I realized that the application is not thread safe and that is probably the cause. So I looked into my classes and entities and realized that one class is not thread-safe because it has two attributes that were not accessed and edited in a thread safe way. The solution in java was to use Atomic classes for example AtomicInteger and to change the value using methods of this class. This way we make the class thread safe and NullPointerException is solved.



Subscribe to #Atomicclasses