Problems with the JmeTests

When I create a JMETests Project (I mean the examples Project in JME3) and try to start a failure:

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

java.lang.NoSuchMethodError: Method org.lwjgl.openal.AL10.nalEnable(I)V not found

at org.lwjgl.openal.AL10.initNativeStubs(Native Method)

at org.lwjgl.openal.AL.init(AL.java:158)

at org.lwjgl.openal.AL.create(AL.java:140)

at org.lwjgl.openal.AL.create(AL.java:104)

at org.lwjgl.openal.AL.create(AL.java:191)

at com.jme3.audio.lwjgl.LwjglAudioRenderer.initialize(LwjglAudioRenderer.java:97)

at com.jme3.app.Application.initAudio(Application.java:176)

at com.jme3.app.Application.initialize(Application.java:387)

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

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

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

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



I don´t know why example that preinstalled don´t work. It is kind of annoying.

1 Like

What computer and OS? Seems like theres a problem with the audio subsystem on your machine.

Packard Bell EasyNote LJ65(Notebook) and Win7

It seems like you’re using a wrong combination of lwjgl.jar and native libraries somehow… But I dont know how you managed to make that happen… Try reinstalling jMP and deleting your preferences while you’re doing it, then reinstall and update to the latest nightly again.

Which lwjgl I have to use. I use 2.4.2, and how can I add native libraries?

You dont have to do or add anything, its all included and handled automatically.

Okay I´m going to try out

So I reinstalled it but I get the same failure

I guess you have put your 2.4 lwjgl libraries in some global libraries directory like [java home]/lib/ or something. It seems like the old version of lwjgl is in the classpath and jMP definitely doesnt put it there.



Edit: btw, does the SceneViewer start properly? Do you see the fps and stats view in the SceneViewer window?

@SceneViewer fps and stats are shown properly



I copied the lwjgl and the lwjgl_util in the libs folder but I get the same failure

Huh? You’re not supposed to put anything there, I said that you probably already have it there and that that is wrong… :roll:

Ups…^^ Okay but what can I do to get it work?

As I said I dont know how you installed lwjgl so that its in the global java classpath. Did you look if there was a lwjgl.jar etc. in the libs folder? Delete it if there is.

So I completly reinstalled the JMP. Now get another failure.

[java]package mygame;

import com.jme3.app.SimpleApplication;

import com.jme3.renderer.ViewPort;

import de.lessvoid.nifty.Nifty;

import de.lessvoid.nifty.examples.LwjglInitHelper;



public class Main extends SimpleApplication {

private Main test;

Nifty nifty;

public static void main(String[] args){

Main test = new Main();

test.start();

}



@Override

public void simpleInitApp() {



if (!LwjglInitHelper.initSubSystems(“CURLING X-TREME”)) {

System.exit(0);

}

StartController start = new StartController(test);



boolean done = false;

while (!done) {

LwjglInitHelper.renderLoop(start.getNifty(), null);

done = true;

}

LwjglInitHelper.destroy();

}



public ViewPort getGUIViewPort(){

return guiViewPort;

}



}

[/java]

[java]package mygame;



import com.jme3.niftygui.NiftyJmeDisplay;

import de.lessvoid.nifty.Nifty;

import de.lessvoid.nifty.screen.Screen;

import de.lessvoid.nifty.screen.ScreenController;





public final class StartController implements ScreenController{

private NiftyJmeDisplay niftyDisplay = null;

private Nifty nifty;

private Screen screen;



public StartController(Main Main) {

niftyDisplay = new NiftyJmeDisplay(Main.getAssetManager(),

Main.getInputManager(),

Main.getAudioRenderer(),

Main.getGUIViewPort());

nifty = niftyDisplay.getNifty();



nifty.fromXml(“Interface/guitest.xml”, “start”, this);



// attach the nifty display to the gui view port as a processor

Main.getGUIViewPort().addProcessor(niftyDisplay);

bind(this.nifty, this.screen);

}



public void bind(Nifty nifty, Screen screen) {

this.nifty = nifty;

this.screen = screen;



}



public void onStartScreen() {

System.out.println(“BLAH”);

}



public Nifty getNifty(){

return this.nifty;

}



public void onEndScreen() {



}



public void starten() {



nifty.fromXml(“Interface/hauptmenu.xml”, “start”,this);

}



public void beenden() {

nifty.exit();

}

}

[/java]



This is the failure that I get:

java.lang.IllegalStateException: Only one LWJGL context may be instantiated at any one time.

at org.lwjgl.opengl.Display.create(Display.java:845)

at org.lwjgl.opengl.Display.create(Display.java:783)

at org.lwjgl.opengl.Display.create(Display.java:764)

at de.lessvoid.nifty.examples.LwjglInitHelper.initGraphics(LwjglInitHelper.java:143)

at de.lessvoid.nifty.examples.LwjglInitHelper.initSubSystems(LwjglInitHelper.java:57)

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

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

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

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

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

1289313883056 WARNING [de.lessvoid.nifty.examples.LwjglInitHelper] Unable to create window!, exiting…

Java Result: -1

Why are you messing with lwjglinithelper?? Thats not right, look at the wiki and examples to see how to use Nifty in jME3. It seems like you try to apply solutions for jME2 to jME3 here…

Now I done it like in the Wiki and it works. Thanks for the help!