Caused by: java.lang.NoClassDefFoundError: com/google/gson/JsonParseException ?

1,371 views
Skip to first unread message

Ed

unread,
Dec 19, 2018, 4:44:55 PM12/19/18
to GWT Users
I just upgraded to GWT 2.8.2, that works fine.
I just noticed that in case the deobfuscator throws an exception as it can't find the GSON JsonParseException, why is that?

Caused by: java.lang.NoClassDefFoundError: com/google/gson/JsonParseException


I can't remember that was in GWT 2.8.0, but I am not sure. Neither do I see gwt-server include the gson automatically as dependency when running maven install.
I added it manually to solve it.

Jens

unread,
Dec 19, 2018, 4:53:36 PM12/19/18
to GWT Users
For both versions the Maven pom.xml for gwt-servlet artifact declares an optional dependency to GSON. It is optional because it is only needed when you use StackTraceDeobfuscator on the server. So if you use that, you need to add GSON manually to your pom.

Maybe you updated some other libraries too which have included GSON transitively but now don't.

-- J.

Ed

unread,
Dec 19, 2018, 5:18:11 PM12/19/18
to GWT Users
Ok, thanks for clearing that up.
Reply all
Reply to author
Forward
0 new messages