Hello Guest

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException

  • 1 Replies
  • 7009 Views
*

zdw71@263.net

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
« on: October 17, 2010, 06:20:31 »
When you want to use the lwjgl in eclipse viewpart or editorpart, may get under error message.

I found that it is a lwjgl plugin error.

In lwjgl plugin 2.2.1 or 2.5.0 version, the org.lwjgl.Activator declear NATIVEPATH as follow,
    public static String[] NATIVEPATH = new String[] { "win32", "macosx","linux" };

but in eclipse plugins path "plugins\org.lwjgl_2.5.0\native" no win32 folder but is windows folder.

So it is a bug. When Copy "plugins\org.lwjgl_2.5.0\native\windows" to "plugins\org.lwjgl_2.5.0\native\win32", it is all right.

It cost me three days for found the error.
 

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.newInstance0(Class.java:326)
   at java.lang.Class.newInstance(Class.java:308)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
   at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
   at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
   at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
   at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:259)
   at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
   at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java:845)
   at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
   at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
   at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
   at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
   at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
   at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
   at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
   at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
   at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
   at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
   at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
   at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
   at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
   at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
   at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
   at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
   at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
   at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
   at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
   at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
   at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2674)
   at lwjgl.game.test.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:38)
   at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1332)
   at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:798)
   at org.eclipse.ui.internal.Workbench$24.runWithException(Workbench.java:1235)
   at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
   at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
   at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
   at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
   at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
   at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
   at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
   at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
   at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584)
   at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
   at org.eclipse.ui.internal.Workbench.init(Workbench.java:1562)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2567)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
   at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at lwjgl.game.test.Application.start(Application.java:20)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.lwjgl (15).
   at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
   at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
   at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
   at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
   ... 78 more
Caused by: org.osgi.framework.BundleException: Exception in org.lwjgl.Activator.start() of bundle org.lwjgl.
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
   at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
   at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
   at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
   at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
   at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
   ... 87 more
Caused by: org.osgi.framework.BundleException: Error loading LWJGL
   at org.lwjgl.Activator.start(Activator.java:65)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
   ... 93 more
Caused by: java.lang.NullPointerException
   at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:313)
   at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.java:227)
   at org.lwjgl.Activator.start(Activator.java:58)
   ... 96 more

*

Offline Matzon

  • *****
  • 2242
Re: java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
« Reply #1 on: October 17, 2010, 07:09:50 »
the eclipse plugin is unfortunately not maintained. When we had the crash on the site, we had to recreate the plugin.
Unfortunately, I think that between 2.2 and the crash, we also changed to using windows instead of win32 (due to x64 support).

I will see what we can do about it, but I have no knowledge about the actual plugin: http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/eclipse-update/
« Last Edit: October 17, 2010, 07:11:41 by Matzon »