Thursday, February 29, 2024

Re: InvocationTargetException with null cause?

I'm guessing this server has been running for a while, and possibly seen/caught other NPEs before this point? Hotspot has an optimization where it stops producing stack traces for null pointer exceptions (as well as a few other exceptions) after it is thrown a few times (usually "many", but technically "two" is possible if they are rare enough and don't affect jit codegen) - if it is being thrown and caught a lot, the JVM will remove this to avoid needing to walk the stack so many times.

You can disable this behavior with the flag "-XX:-OmitStackTraceInFastThrow". Here's the writeup that I usually find when I get bothered by this issue:
On Thursday, February 29, 2024 at 10:23:05 AM UTC-6 wrote:

I am afraid this is probably more a general Java question than a pure GWT question. But I am suspecting the problem somewhere in GWT server-side hence asking here.

I am looking for help to read my stack trace around GWT RPC and InvocationTargetException Btw the system recovered after a server restart, without changing anything.

Stack trace was:
Caused by: Service method 'public abstract xx.webapp.shared.domain.xxDTO xx.share>
     at xxx.server.spring.SpringGwtRemoteServiceServlet.processCall(
      ... 101 common frames omitted
Caused by: java.lang.NullPointerException: null

{call stack log ends here}

Relevant GWT code from RPC class:


RPC class checks for cause==null so that's not it. But then why is it not showing the actual line of code where the causing exception is thrown?


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment