Often in Java program stack trace, you will see some stack frames include a source line number, while some only say “compiled code”. This is because the stack frames without line numbers have been compiled by the JIT compiler, and the JIT compiler obliterates line number information when it compiles code.
To ensure that source line numbers always appear in stack traces, disable the JIT compiler by running your program with
java -Djava.compiler=NONE blahblahblah...
Now stack traces will show line numbers for each stack frame.