To get the stack traces back, you need to pass the option -XX:-OmitStackTraceInFastThrow to the JVM.
The optimization is that when an exception (typically a NullPointerException) occurs for the first time, the full stack trace is printed and the JVM remembers the stack trace (or maybe just the location of the code). When that exception occurs often enough, the stack trace is not printed anymore, both to achieve better performance and not to flood the log with identical stack traces.
T. Zhou, M. Jantz, P. Kulkarni, K. Doshi, and V. Sarkar. Proceedings of the 28th International Conference on Compiler Construction, page 147--158. New York, NY, USA, ACM, (2019)
T. Mytkowicz, D. Coughlin, and A. Diwan. Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, page 175--190. ACM, (2009)