Let me try to explain..We have a server running Jboss 5.1
with really many concurrent connections, and well, sometimes we need to restart and do some maintenance/release.
The problem is, sometimes we start up the server and it looks like some library just didn't load at startup time, or for some other reason, we keep getting NullPointerException
without any stacktrace.. we do know the class it is thrown, but by checking the code, where nullpointers could for some reason be thrown, and even forcing a few exceptions, all of them have at least the stacktrace.
I found here in stackoverflow many answers telling about the JVM
doing some optimizations but we have just started up the server.I don't believe it does any optimization even when the first exception
is thrown.I have also checked for any relevant setStackTrace
or codes like ex.toString()
..which we also do not have.
So my question actually is, for what reason other than this optimization thing, could such exception
be thrown without stacktrace?
EDIT:
My question is NOT related to the -XX:-OmitStackTraceInFastThrow
, since it happens even at the first exception!