I see the following message below in the app.log repeatedly and I believe it is also shown to users in a pop up stating “NullPointerException”. There is no associated stack trace so I can’t work out what is happening - has anyone else seen this?
Missing stack trace is a JVM optimization for frequently repeated exceptions.
You can disable it by adding -XX:-OmitStackTraceInFastThrow to setenv.sh (setenv.bat) file.
Thanks that does explain it as sometimes I’ll see an exception with full stack trace then future ones do not have it.
I’m using a Docker image with Tomcat but I must admit I can’t see where the setenv.sh/bat file is - I know slightly off topic but would you by any chance know a likely location for it?
setenv.sh can be created in the bin folder to set variables before JVM start. It is automatically found and invoked by catalina.sh.
As an example, see this file created by local deployment when you start Tomcat from Studio or Gradle task.