Uncaught exception thrown in Thread[jME3 Main,5,main]
IncompatibleClassChangeError: Found interface com.jme3.app.Application, but class was expected
I’ve just loaded a project I last worked on in one of the first versions of 3.1, into the latest version of the 3.1 sdk and several simple scenes run normally, but the one that uses a custom appstate is producing the above error.
The first hit is where I am doing:
this.app = (SimpleApplication) app;
in my initialize method (overriding the method inherited from AbstractAppState) in order to give the appstate access to the app’s methods.
I feel that there must be a simple reason for this that I’m just failing to see and was hoping someone could help.
Always whenever you see an exception like that or a “missing method definition error” or some such… 99.9999% of the time this indicates “I need to do a clean build”.
After running clean and build I’m still getting the same error, but it moved from my appstate over to
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IncompatibleClassChangeError: Found interface com.jme3.app.Application, but class was expected
at com.simsilica.lemur.GuiGlobals.(GuiGlobals.java:127)
So I presume I have to hunt down a newer version of Lemur as well?
The version I had was old enough not to have a version number - just “lemur.jar”, I’ve updated it to 1.82 (and slf4j) and now it seems to be working again.
I tend to get this error from time to time when using old libraries too, and simply cleaning them won’t always help. So for my own and others reference, here is what I do then:
Remove the import reference to Application from the class in question. Recompile (getting compile error), add it again. Rebuild.