Nonsensical Runtime Exception

Hey, so I am working on my game, Gravity Arena (See post in user projects), and I am having some ridiculous run-time exception.



SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.ExceptionInInitializerError

at mygame.Main.simpleInitApp(Main.java:175)

at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)

at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.RuntimeException: Uncompilable source code - ShipParts.Weapons.GravityWellCaster is not abstract and does not override abstract method weaponProjectile(Ships.Ship,ShipParts.Weapons.Weapon,com.jme3.math.Vector3f,float,float,float) in ShipParts.Weapons.Weapon

at ShipParts.Weapons.PrimaryWeapon.(PrimaryWeapon.java:14)

… 5 more



Okay, so…

point 1) GravityWellCaster is a class I deleted because I am just making a buildable version for demoing and distribution.

point 2) PrimaryWeapon line 14 is in the comments section above the code of the file

point 3) I already did a clean on the project.

I’ve gotten this bug too. Turns out to be something about the way Netbeans compiles on save. It gets really confused and is often impossible to clear. I’ve gone into my project settings and turned off “Compile on save” to get around this… and I only found that out by google searching the error.

1 Like

So what do you propose? Delete my project and start fresh from the sources?



Also I got this when I did clean:



java.lang.NullPointerException

at org.netbeans.modules.form.FormDataLoader.createPrimaryEntry(FormDataLoader.java:147)

at org.openide.loaders.MultiDataObject.createPrimaryEntry(MultiDataObject.java:1099)

at org.openide.loaders.MultiDataObject.(MultiDataObject.java:124)

at org.netbeans.modules.form.FormDataObject.(FormDataObject.java:82)

at org.netbeans.modules.form.FormDataLoader.createMultiObject(FormDataLoader.java:125)

at org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:145)

at org.openide.loaders.DataObjectPool.handleFindDataObject(DataObjectPool.java:161)

[catch] at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:407)

at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:380)

at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:535)

at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:493)

at org.openide.loaders.DataObject.find(DataObject.java:532)

at org.netbeans.modules.project.ui.OpenProjectList.getTemplatesLRU(OpenProjectList.java:1012)

at org.netbeans.modules.project.ui.OpenProjectList.prepareTemplates(OpenProjectList.java:1186)

at org.netbeans.modules.project.ui.actions.NewFile$3.run(NewFile.java:305)

at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)

at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)

@pspeed said:
I've gone into my project settings and turned off "Compile on save" to get around this.

clear the cache too… usually helps with weird stuff.

Deleting and restarting from sources worked.

@yuxemporos said:
Deleting and restarting from sources worked.


Sure it did because it blew away all of the incremental compile crud. But that will grow tiresome every time it happens (and it will happen again surely).

Next time, just go into the project settings and turn off "Compile on save" then clean-rebuild your project. You might have to edit and save the file that was erroring out but it will definitely work. And the problem will never happen again.

I’ve had similar (http://hub.jmonkeyengine.org/groups/jmonkeyplatform/forum/topic/jme3-beta-1-misleading-java-lang-runtimeexception-uncompilable-source-code/) problems.

Clear the cache as androlo said seems to fix most of these.

Yeah, any weird build problems I’ve had (over many many years working with netbeans) have always been fixed by clearing the cache - no need to fiddle with code or recreate projects or anything.

slightly unrelated, but my code completion wasn’t working in Visual Studio, so I had to delete all the Intellisense cache stuff as well to fix that

@pspeed said:
Sure it did because it blew away all of the incremental compile crud. But that will grow tiresome every time it happens (and it will happen again surely).

Next time, just go into the project settings and turn off "Compile on save" then clean-rebuild your project. You might have to edit and save the file that was erroring out but it will definitely work. And the problem will never happen again.


Oh, of course I did that too because I don't want to have to do this every week.
@wezrule said:
slightly unrelated, but my code completion wasn't working in Visual Studio, so I had to delete all the Intellisense cache stuff as well to fix that

@zarch said:
Yeah, any weird build problems I've had (over many many years working with netbeans) have always been fixed by clearing the cache - no need to fiddle with code or recreate projects or anything.

@jmaasing said:
I've had similar (http://hub.jmonkeyengine.org/groups/jmonkeyplatform/forum/topic/jme3-beta-1-misleading-java-lang-runtimeexception-uncompilable-source-code/) problems.
Clear the cache as androlo said seems to fix most of these.

@androlo said:
clear the cache too.. usually helps with weird stuff.


So where's this cache everyone and their grandma is talking about clearing? I'd rather do that whenever I have a problem then restart the project, it's kind of annoying because I am often creating these projects because I want to delete things from the project without deleting them from the repository.

That’s why I linked to the time I had problems :wink: “For future reference, the cache is located in .jmonkeyplatform/3.0beta/var/cache”

1 Like
@jmaasing said:
That's why I linked to the time I had problems ;) "For future reference, the cache is located in .jmonkeyplatform/3.0beta/var/cache"


So... just delete the contents of that folder?

I don't want to do the wrong thing and have to reinstall the sdk again :P

Anyway thanks for the help everyone!

yes

1 Like