3.1.2-SNAPSHOT - java.lang.NoSuchMethodError

Started by Phobeus, April 15, 2017, 18:17:37

Previous topic - Next topic

Phobeus

Hi guys,
running some application here against 3.1.1 under Linux absolutely fine. Now I am trying to switch to 3.1.2-SNAPSHOT due to some new bindings I would like to give a try. However during runtime, I am getting this error:
[LWJGL] Version: 3.1.2 build 22
[LWJGL] 	 OS: Linux v4.10.9-200.fc25.x86_64
[LWJGL] 	JRE: 1.8.0_121 amd64
[LWJGL] 	JVM: Java HotSpot(TM) 64-Bit Server VM v25.121-b13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: /tmp/lwjglphobeus/3.1.2-build-22/liblwjgl.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglphobeus/3.1.2-build-22/liblwjgl.so
[LWJGL] Loading library: glfw
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: /tmp/lwjglphobeus/3.1.2-build-22/libglfw.so
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglphobeus/3.1.2-build-22/libglfw.so
[LWJGL] Loading library: jemalloc
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: /tmp/lwjglphobeus/3.1.2-build-22/libjemalloc.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglphobeus/3.1.2-build-22/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
20:03:57.716 [main] INFO  c.d.c.e.subsystem.window.CoreWindow - Using OpenGL profile for 4.0
20:03:57.783 [main] INFO  c.d.c.e.subsystem.window.CoreWindow - Creating OpenGL context for OpenGL 4.0
[LWJGL] Loading library (system): lwjgl_opengl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: /tmp/lwjglphobeus/3.1.2-build-22/liblwjgl_opengl.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglphobeus/3.1.2-build-22/liblwjgl_opengl.so
Exception in thread "main" java.lang.NoSuchMethodError: org.lwjgl.system.Library.loadNative(Lorg/lwjgl/system/Configuration;[Ljava/lang/String;)Lorg/lwjgl/system/SharedLibrary;
	at org.lwjgl.opengl.GL.create(GL.java:96)
	at org.lwjgl.opengl.GL.<clinit>(GL.java:81)
[...]


So the exception is raised within my own code when calling "GL.createCapabilities();". I am a bit lost about the reason here as the exactly the same code is working without any issues against 3.1.1. Anyone who explain how this is caused or at least giving a hint if code or more likely something related to the OS?

Many thanks in advance!
Phobeus

Kai

The most likely reason is that you have an old/incompatible lwjgl-opengl*.jar in your classpath, which is _not_ from LWJGL version 3.1.2 build 22. Please check your classpath.

Phobeus

 ::) You're absolutely right. Was using some property in the pom.xml for the versions and the openGL one was still set to 3.1.1. Setting this correctly, solves the issue. Many thanks!