Groovy NoClassDefFoundError

Deps: OpenJDK 15, failureaccess-1.0.1, groovy-jsr223-4.0.2, guava-31.1-jre, lemur-1.16.0-javadoc, sio2-1.7.0-javadoc, slf4j-api-2.0.0-alpha7-sources (macOS 11.6.5). Are these ok?

This shows in a window:
Error in application:

Uncaught exception thrown in Thread[jME3 Main,5,main]
NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException

Could it be related to[ my issue](https://hub.jmonkeyengine.org/t/illegal-reflective-access-warning/45603/4) about illegal reflective access?
The error is here as well.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jme3.util.ReflectionAllocator (file:/Users/erik/Documents/Dev/jME3/lib/jme3-core.jar) to method sun.nio.ch.DirectBuffer.cleaner()

Code, this time I tried [creating a ui](https://github.com/jMonkeyEngine-Contributions/Lemur/wiki/Getting-Started) (not sure I installed all dependencies correctly).

public class ClientWindow extends SimpleApplication {
    private boolean isRunning = true;
    protected Geometry player;


    
    @Override
    public void simpleInitApp() {
        Box b = new Box(1, 1, 1);
        player = new Geometry("Player", b);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", ColorRGBA.Blue);
        player.setMaterial(mat);
        rootNode.attachChild(player);
        initKeys(); // load my custom keybinding
        
        //GUI
        // Initialize the globals access so that the default
        // components can find what they need.
        GuiGlobals.initialize(this);
        // Load the 'glass' style
        BaseStyles.loadGlassStyle();
        // Set 'glass' as the default style when not specified
        GuiGlobals.getInstance().getStyles().setDefaultStyle("glass");
        Container ourWin = new Container();
        guiNode.attachChild(ourWin);
        ourWin.setLocalTranslation(200, 200, 0);
        ourWin.addChild(new Label("Items: "));
        Button button = ourWin.addChild(new Button("quit"));
        button.addClickCommands(new Command<Button>() {
            @Override
            public void execute(Button source) {
                System.out.println("Quit button pressed.");
            }
        });
    }

    private void initKeys() {
        // You can map one or several inputs to one named action
        //inputManager.deleteMapping( SimpleApplication.INPUT_MAPPING_MEMORY );
        inputManager.addMapping("Up",  new KeyTrigger(KeyInput.KEY_W),
                                                    new KeyTrigger(KeyInput.KEY_UP));
        inputManager.addMapping("Left",   new KeyTrigger(KeyInput.KEY_A),
                                                        new KeyTrigger(KeyInput.KEY_LEFT));
        inputManager.addMapping("Right",  new KeyTrigger(KeyInput.KEY_D),
                                                        new KeyTrigger(KeyInput.KEY_RIGHT));
        inputManager.addMapping("Down", new KeyTrigger(KeyInput.KEY_S),
                new KeyTrigger(KeyInput.KEY_DOWN));
        // Add the names to the action listener.
        
        inputManager.addListener(actionListener, "Up", "Left", "Right", "Down");
        // inputManager.addListener(analogListener, "Up", "Left", "Right", "Down");
    }

    
    private final ActionListener actionListener = new ActionListener() {
        @Override
        public void onAction(String name, boolean keyPressed, float tfp) {
            if(isRunning){ 
                float value=0.4f;//arbitrary offset for now.
                if (name.equals("Up") && !keyPressed ) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x, v.y + value /** speed*/, v.z);

                }
                if (name.equals("Down")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x, v.y - value /** speed*/, v.z);
                }
                if (name.equals("Right")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x - value /** speed*/, v.y, v.z);
                }
                if (name.equals("Left")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x + value /** speed*/, v.y, v.z);
                }
            }
        }
    };

    @Override
    public void simpleUpdate(float tpf) {
        //TODO: add update code
    }

}

No, you need groovy-all.jar…
See this :

1 Like

Thanks I tried your link and it works with that older groovy 2! But in groovy 3 and 4 there’s no longer a groovy-all.jar.

Use older one, or if the class org/codehaus/groovy/control/CompilationFailedException exists there, then no problem.

1 Like

The stack trace is missing all of the really important information (like the stack trace) so I can’t tell for sure… but it’s possible that Lemur is not compatible with the newer Groovy versions. Though that would be weird because Lemur goes out of its way to avoid depending on Groovy directly.

I temporarily went back to groovy-jsr223-4.0.2 and dumped this stack.

"Monitor Ctrl-Break" #11 daemon prio=5 os_prio=31 cpu=38.00ms elapsed=148.81s tid=0x00007f9ade80f600 nid=0x9803 runnable  [0x0000700008b21000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.SocketDispatcher.read0(java.base@15.0.1/Native Method)
	at sun.nio.ch.SocketDispatcher.read(java.base@15.0.1/SocketDispatcher.java:47)
	at sun.nio.ch.NioSocketImpl.tryRead(java.base@15.0.1/NioSocketImpl.java:261)
	at sun.nio.ch.NioSocketImpl.implRead(java.base@15.0.1/NioSocketImpl.java:312)
	at sun.nio.ch.NioSocketImpl.read(java.base@15.0.1/NioSocketImpl.java:350)
	at sun.nio.ch.NioSocketImpl$1.read(java.base@15.0.1/NioSocketImpl.java:803)
	at java.net.Socket$SocketInputStream.read(java.base@15.0.1/Socket.java:981)
	at sun.nio.cs.StreamDecoder.readBytes(java.base@15.0.1/StreamDecoder.java:297)
	at sun.nio.cs.StreamDecoder.implRead(java.base@15.0.1/StreamDecoder.java:339)
	at sun.nio.cs.StreamDecoder.read(java.base@15.0.1/StreamDecoder.java:188)
	- locked <0x0000000780385f50> (a java.io.InputStreamReader)
	at java.io.InputStreamReader.read(java.base@15.0.1/InputStreamReader.java:181)
	at java.io.BufferedReader.fill(java.base@15.0.1/BufferedReader.java:161)
	at java.io.BufferedReader.readLine(java.base@15.0.1/BufferedReader.java:326)
	- locked <0x0000000780385f50> (a java.io.InputStreamReader)
	at java.io.BufferedReader.readLine(java.base@15.0.1/BufferedReader.java:392)
	at com.intellij.rt.execution.application.AppMainV2$1.run(AppMainV2.java:48)


"AWT-EventQueue-0" #16 prio=6 os_prio=31 cpu=1577.96ms elapsed=148.08s tid=0x00007f9adf231600 nid=0xd10b waiting on condition  [0x0000700009033000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@15.0.1/Native Method)
	- parking to wait for  <0x00000007804d0318> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@15.0.1/LockSupport.java:341)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(java.base@15.0.1/AbstractQueuedSynchronizer.java:505)
	at java.util.concurrent.ForkJoinPool.managedBlock(java.base@15.0.1/ForkJoinPool.java:3137)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@15.0.1/AbstractQueuedSynchronizer.java:1614)
	at java.awt.EventQueue.getNextEvent(java.desktop@15.0.1/EventQueue.java:566)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@15.0.1/EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@15.0.1/EventDispatchThread.java:124)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@15.0.1/EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@15.0.1/EventDispatchThread.java:109)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@15.0.1/EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.run(java.desktop@15.0.1/EventDispatchThread.java:90)


"TimerQueue" #23 daemon prio=5 os_prio=31 cpu=11.27ms elapsed=145.43s tid=0x00007f9ade2aa000 nid=0xfc13 waiting on condition  [0x00007000096c8000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@15.0.1/Native Method)
	- parking to wait for  <0x000000078066ce68> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@15.0.1/LockSupport.java:341)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(java.base@15.0.1/AbstractQueuedSynchronizer.java:505)
	at java.util.concurrent.ForkJoinPool.managedBlock(java.base@15.0.1/ForkJoinPool.java:3137)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@15.0.1/AbstractQueuedSynchronizer.java:1614)
	at java.util.concurrent.DelayQueue.take(java.base@15.0.1/DelayQueue.java:217)
	at javax.swing.TimerQueue.run(java.desktop@15.0.1/TimerQueue.java:171)
	at java.lang.Thread.run(java.base@15.0.1/Thread.java:832)


"Common-Cleaner" #10 daemon prio=8 os_prio=31 cpu=4.76ms elapsed=148.94s tid=0x00007f9ade031000 nid=0x9b03 in Object.wait()  [0x0000700008a1e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@15.0.1/ReferenceQueue.java:155)
	- locked <0x0000000780388230> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run(java.base@15.0.1/CleanerImpl.java:148)
	at java.lang.Thread.run(java.base@15.0.1/Thread.java:832)
	at jdk.internal.misc.InnocuousThread.run(java.base@15.0.1/InnocuousThread.java:134)


"Java2D Queue Flusher" #17 daemon prio=10 os_prio=31 cpu=144.88ms elapsed=148.03s tid=0x00007f9ade91ec00 nid=0x12803 in Object.wait()  [0x0000700009136000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <no object reference available>
	at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(java.desktop@15.0.1/OGLRenderQueue.java:205)
	- locked <0x00000007803888f0> (a sun.java2d.opengl.OGLRenderQueue$QueueFlusher)
	at java.lang.Thread.run(java.base@15.0.1/Thread.java:832)


"Reference Handler" #2 daemon prio=10 os_prio=31 cpu=2.73ms elapsed=149.04s tid=0x00007f9ade820800 nid=0x3803 waiting on condition  [0x0000700008180000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList(java.base@15.0.1/Native Method)
	at java.lang.ref.Reference.processPendingReferences(java.base@15.0.1/Reference.java:241)
	at java.lang.ref.Reference$ReferenceHandler.run(java.base@15.0.1/Reference.java:213)


"Finalizer" #3 daemon prio=8 os_prio=31 cpu=5.75ms elapsed=149.03s tid=0x00007f9ade823000 nid=0x3a03 in Object.wait()  [0x0000700008283000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <0x0000000780387738> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@15.0.1/ReferenceQueue.java:155)
	- locked <0x0000000780387738> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@15.0.1/ReferenceQueue.java:176)
	at java.lang.ref.Finalizer$FinalizerThread.run(java.base@15.0.1/Finalizer.java:170)


"AWT-Shutdown" #15 prio=5 os_prio=31 cpu=1.01ms elapsed=148.41s tid=0x00007f9ade104200 nid=0xaf03 in Object.wait()  [0x0000700008e2a000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <0x00000007803883f0> (a java.lang.Object)
	at java.lang.Object.wait(java.base@15.0.1/Object.java:321)
	at sun.awt.AWTAutoShutdown.run(java.desktop@15.0.1/AWTAutoShutdown.java:291)
	- locked <0x00000007803883f0> (a java.lang.Object)
	at java.lang.Thread.run(java.base@15.0.1/Thread.java:832)


"Java2D Disposer" #19 daemon prio=10 os_prio=31 cpu=1.50ms elapsed=147.88s tid=0x00007f9ade927e00 nid=0x11703 in Object.wait()  [0x000070000933c000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <0x0000000780386290> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@15.0.1/ReferenceQueue.java:155)
	- locked <0x0000000780386290> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@15.0.1/ReferenceQueue.java:176)
	at sun.java2d.Disposer.run(java.desktop@15.0.1/Disposer.java:144)
	at java.lang.Thread.run(java.base@15.0.1/Thread.java:832)


"Timer-0" #20 daemon prio=6 os_prio=31 cpu=0.68ms elapsed=147.47s tid=0x00007f9add8fd200 nid=0xf20b in Object.wait()  [0x000070000943f000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@15.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@15.0.1/Object.java:321)
	at java.util.TimerThread.mainLoop(java.base@15.0.1/Timer.java:527)
	- locked <0x00000007803864d8> (a java.util.TaskQueue)
	at java.util.TimerThread.run(java.base@15.0.1/Timer.java:506)


"Signal Dispatcher" #4 daemon prio=9 os_prio=31 cpu=0.34ms elapsed=149.01s tid=0x00007f9ade030400 nid=0x5903 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Service Thread" #5 daemon prio=9 os_prio=31 cpu=5.79ms elapsed=149.01s tid=0x00007f9ade030a00 nid=0xa503 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread0" #6 daemon prio=9 os_prio=31 cpu=837.21ms elapsed=149.01s tid=0x00007f9ade823c00 nid=0xa303 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task


"C1 CompilerThread0" #8 daemon prio=9 os_prio=31 cpu=785.90ms elapsed=149.01s tid=0x00007f9add87e000 nid=0x5f03 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task


"Sweeper thread" #9 daemon prio=9 os_prio=31 cpu=0.07ms elapsed=149.00s tid=0x00007f9adf00de00 nid=0x6003 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Notification Thread" #12 daemon prio=9 os_prio=31 cpu=0.06ms elapsed=148.81s tid=0x00007f9ade80ee00 nid=0x9603 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"AppKit Thread" #14 daemon prio=5 os_prio=31 cpu=1092.65ms elapsed=148.55s tid=0x00007f9adf208e00 nid=0x103 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Attach Listener" #18 daemon prio=9 os_prio=31 cpu=33.37ms elapsed=147.99s tid=0x00007f9ade140000 nid=0xd803 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"DestroyJavaVM" #26 prio=5 os_prio=31 cpu=462.20ms elapsed=144.00s tid=0x00007f9add808200 nid=0x1a03 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"VM Thread" os_prio=31 cpu=13.66ms elapsed=149.04s tid=0x00007f9add429c20 nid=0x4503 runnable  


"GC Thread#0" os_prio=31 cpu=18.40ms elapsed=149.05s tid=0x00007f9add5207b0 nid=0x2f03 runnable  


"GC Thread#1" os_prio=31 cpu=20.17ms elapsed=145.38s tid=0x00007f9add7e6380 nid=0x15813 runnable  


"GC Thread#2" os_prio=31 cpu=20.47ms elapsed=145.38s tid=0x00007f9ae174d980 nid=0x1fd03 runnable  


"GC Thread#3" os_prio=31 cpu=16.07ms elapsed=145.38s tid=0x00007f9ae1fc8da0 nid=0x1fc03 runnable  


"G1 Main Marker" os_prio=31 cpu=0.08ms elapsed=149.05s tid=0x00007f9add4079a0 nid=0x3103 runnable  


"G1 Conc#0" os_prio=31 cpu=0.03ms elapsed=149.05s tid=0x00007f9add408a60 nid=0x3303 runnable  


"G1 Refine#0" os_prio=31 cpu=8.71ms elapsed=149.05s tid=0x00007f9add424490 nid=0x3403 runnable  


"G1 Refine#1" os_prio=31 cpu=0.24ms elapsed=145.36s tid=0x00007f9add641440 nid=0x1fa03 runnable  


"G1 Refine#2" os_prio=31 cpu=0.08ms elapsed=145.35s tid=0x00007f9ae120aa50 nid=0x15e03 runnable  


"G1 Young RemSet Sampling" os_prio=31 cpu=24.33ms elapsed=149.05s tid=0x00007f9add60a3b0 nid=0x4603 runnable  


"VM Periodic Task Thread" os_prio=31 cpu=127.82ms elapsed=148.81s tid=0x00007f9add72e9e0 nid=0x9503 waiting on condition  
JNI global refs: 113, weak refs: 94



No, I mean… this:

…there should have been a stack trace below it.