0

Can someone tell me how can I squeeze some more information from GWT application if all error reports that I see in logs are:

Client side: Caused by: java.lang.RuntimeException: Server Error 500...

Server side: [ERROR] 500 - POST /gwtRequest (127.0.0.1) 1420 bytes (red font)

(I run app in dev mode from Maven by gwt:run so it's running on Jetty)

Except that it's related with RequestFactory (/gwtRequest), I have absolutely no idea what's going on. It's possibly related with invalid Entity-Proxy or Request-Service contract, but I have correctly configured RequestFactory-apt validator in both Eclipse and Maven and I'm getting no errors from it (and usually this validation works fine for me).

Any ideas what can I do to learn a little more about a problem and why the heck GWT don't just give me a server stack trace showing what's going wrong on server-side?

EDIT: I found error: I had @Enumerated(EnumType.STRING) enum field in my JPA entity. In database there was varchar value that didn't matched any value of enum. But I still the question is why I didn't get stack trace. If I got it, I'd solved it in 1 min, not in half day.

Piotr Sobczyk
  • 6,443
  • 7
  • 47
  • 70

1 Answers1

2

Same like here: RequestFactory: error.getExceptionType() returns null in Receiver#onFailure

You have to provide your own ExceptionHandler by extending RequestFactoryServlet

Implement this and you get your StackTrace and find the Problem: http://cleancodematters.com/2011/05/29/improved-exceptionhandling-with-gwts-requestfactory/

Takes five minutues and saves you much time now and in future.

Community
  • 1
  • 1
Sam
  • 2,707
  • 1
  • 23
  • 32
  • Thanks for valuable input, Sam, but unfortunately we already did this. The problem I described occurs on GWT environment configured like in article :(. – Piotr Sobczyk May 09 '12 at 11:18