Got an web application running on Tomcat. I log exceptions and their stack traces using slf4j/logback. e.g.
2017-08-01 00:00:00.000 [http-nio-80-exec-5] ERROR g.s.GuiceyRequestFactoryServlet - 'Server Failure'
java.lang.reflect.InvocationTargetException: null
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.33]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_131]
Caused by: ...
... 59 common frames omitted
Caused by: ...
... 64 common frames omitted
java.lang.NullPointerException: null
Because the real place that caused the NPE is nested a few level down within at least two reflection invocations, not sure if thats the case, Tomcat/slf4j/logback does not show the full stacktrace and stopped at the NPE, not further down.
I am expecting something like e.g.
2017-08-01 00:00:00.000 [http-nio-80-exec-5] ERROR g.s.GuiceyRequestFactoryServlet - 'Server Failure'
java.lang.reflect.InvocationTargetException: null
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.33]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_131]
Caused by: ...
... 59 common frames omitted
Caused by: ...
... 64 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.util.Calendar.setTime(Calendar.java:1770) ~[na:1.8.0_60]
... 80 common frames omitted
i.e. to show a deeper stacktrace in the log. Does anyone know where should I look at and how to achieve that? e.g. Tomcat config? logback config? slf4j methods?
Edit
For those thinking this is a duplication of some other question asking about those "... xx common frames omitted", NO, I do not care these lines. I was asking about the last NPE not being printed AT ALL. Please ready carefully first.