0

This is the error:

enter image description here

I'm new to compiling GWT apps and I've heard that compile errors are pretty common so any advice on how to debug these types of exceptions in the future would be greatly appreciated. Thanks!

EDIT: Since I am new to these errors if I'm missing any information on how to fix this please let me know with a comment and I'll post everything I can.

2
  • First, do not post images of text. Copy/paste the text and format as code to preserve indentation/line breaks. Second, this is not a compiler message, it is a runtime exception. It means you compiled the code against a library, but then deployed it somewhere where the library is not available. The code expected to find a class and method and, while everything was there when you compiled, at runtime a class (or likely an entire jar file) was missing. This can also be caused by having different library versions at compile and deployment. Commented Sep 5, 2016 at 20:50
  • Ok, thanks for the tip. That already clears up a lot of confusion. Commented Sep 5, 2016 at 21:15

2 Answers 2

1

Since your question is little generic, here is a generic approach to debug such errors. I follow this apporoach to debug NoSuchClass and NoSuchMethod exception while writing Android apps;

  1. Make sure you are importing the correct libraries.

  2. Look at the stack trace. If the exception appears when calling a method on an object in a library, you are most likely using separate versions of the library when compiling and running. Make sure you have the right version both places.

  3. Could be caused by conflicting versions of JARs.

  4. NoSuchMethodError is different from NoSuchMethodException. The latter is usually occurs with non-reflective code. Do not get confused between two.
Sign up to request clarification or add additional context in comments.

Comments

1

In this specific case, make sure you don't mix GWT dependencies from different GWT versions. It's likely that you have gwt-codeserver (which is actually useless, as all classes are also in gwt-dev) and gwt-dev from different versions.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.