[SOLVED] jME3 beta 1: Misleading java.lang.RuntimeException: Uncompilable source code

When I try to run my project in the IDE I get the wrong error reported. I get:



java.lang.ExceptionInInitializerError



Caused by: java.lang.RuntimeException: Uncompilable source code - X is not abstract and does not override abstract method



However I am totally sure that the class X is not in error (the editor agrees, so does ANT when building). If I build the project, unpack the dist-jars and run from there I get the real error which is a NullPointer in another class used by the constructor of X.



Not a big problem but I wonder if anyone else has seen this?



EDIT: Must have been some strange caching going on. I added a space, then removed it in the file jME complained about. Saved and the error went away.

But before that I had tested to clean & build several times. I had also manually removed the files in both build & dist before starting jME. So answer was - a fluke :slight_smile:

We don’t have enough information to help. The important parts of the errors have all been stripped.



For example, I don’t know what would be trying to compile source code at runtime in the first place but the stack trace isn’t there (arguably the most useful part of an exception) so I can’t begin to guess what is trying to compile source code.

@pspeed said:
We don't have enough information to help. The important parts of the errors have all been stripped.

For example, I don't know what would be trying to compile source code at runtime in the first place but the stack trace isn't there (arguably the most useful part of an exception) so I can't begin to guess what is trying to compile source code.


Sorry for being so terse, a failed attempt at trying to be concise.

I press F6 to run the application. The output tab showing the logging output says this:

Apr 04, 2012 8:20:02 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ExceptionInInitializerError
at nu.zoom.frozenmoon.main.FrozenMoon.simpleInitApp(FrozenMoon.java:85)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:231)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Uncompilable source code - nu.zoom.frozenmoon.vehicle.DebugVehicle is not abstract and does not override abstract method getVehiclePhysics() in nu.zoom.frozenmoon.vehicle.Vehicle
at nu.zoom.frozenmoon.vehicle.AbstractVehicleInfoVehicle.(AbstractVehicleInfoVehicle.java:15)
... 5 more

Apr 04, 2012 8:20:02 AM com.jme3.renderer.lwjgl.LwjglRenderer cleanup



When I run the application from the command line using the jME-built dist-JARs my logging tells me that I try to assign null as a control to a Node.


Apr 04, 2012 8:11:02 AM nu.zoom.frozenmoon.vehicle.AbstractControlledVehicle initialize
SEVERE: Vehicle must have a physics control (propulsion module) mounted before initialize
Sorry, something went really bad:
null
AL lib: ReleaseALC: 1 device not closed


[java]
if (currentVehicleControl == null) {
log.log(Level.SEVERE, "Vehicle must have a physics control (propulsion module) mounted before initialize");
}
vehicleNode.addControl(currentVehicleControl);
[/java]

I'm running:
Product Version: jMonkeyEngine SDK 3.0beta
Java: 1.7.0_01; Java HotSpot(TM) 64-Bit Server VM 21.1-b02
System: Linux version 2.6.32-5-amd64 running on amd64; ANSI_X3.4-1968; en_US (jmonkeyplatform)

I edited the topic and first post. Seems that when jME recompiled the file the error went away. What fooled me was that I had issued “clean & build” several times with no change, restarted jME several times, even manually removed the files in build & dist before starting jME. What fixed it was editing (actually insert a space and remove it again) the file jME complained about and save it again.



Oh well, that happens all the time in eclipse so I’m used to it from work :slight_smile:

If net beans starts being “funny” (doesn’t happen that often, maybe once a year with intensive use) I find that wiping the cache fixes it.

1 Like
@zarch said:
If net beans starts being "funny" (doesn't happen that often, maybe once a year with intensive use) I find that wiping the cache fixes it.

Thanks for the tip. I have had my problems with regular netbeans but never this so I didn't know where to look. For future reference, the cache is located in .jmonkeyplatform/3.0beta/var/cache