2

This just happen in Eclipse while I am try to use Swing in a Linux system. Can anyone tell me why? What is the solution?

Could not open the editor: An unexpected exception was thrown.

java.lang.NullPointerException
    at org.eclipse.wb.internal.core.editor.multi.SourcePage.updateSourceActions(SourcePage.java:140)
    at org.eclipse.wb.internal.core.editor.multi.SourcePage.handleActiveState(SourcePage.java:74)
    at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
    at org.eclipse.wb.internal.core.editor.multi.MultiPagesMode.showSource(MultiPagesMode.java:54)
    at org.eclipse.wb.internal.core.editor.multi.MultiPagesMode.create(MultiPagesMode.java:100)
    at org.eclipse.wb.internal.core.editor.multi.DesignerEditor.createPartControl(DesignerEditor.java:87)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    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.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
    at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
    at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972)
    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:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
    at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
    at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
    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:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • 1
    Eclipse doesn't use Swing, it use SWT, the error seems to be related to Eclipse and not Swing/Java per say. – MadProgrammer Oct 06 '15 at 04:29
  • It's there to test you ;) - Been a `NullPointerException`, it's board line, been a product support question ... hmmm ... – MadProgrammer Oct 06 '15 at 04:38
  • The question is board-line closable for been a duplicate of [What is a Null Pointer Exception, and how do I fix it?](http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception-and-how-do-i-fix-it) or *"Why is my code not working without providing a runnable example"* – MadProgrammer Oct 06 '15 at 04:39
  • Your question asks about Swing and `JFrame`, when the problem is clearly related to Eclipse alone, so if you want to talk about confusing... – MadProgrammer Oct 06 '15 at 04:41
  • Maybe [Error trying to use WindowBuilder on Eclipse](http://stackoverflow.com/questions/22860510/error-trying-to-use-windowbuilder-on-eclipse) is more closely a duplicate or this [bug report](https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/1201198) can help – MadProgrammer Oct 06 '15 at 04:44
  • that problem occur in Eclipse due to Swing and Jframe (may be some bugs? ) , so its a valid Q – Arone Asadas Oct 06 '15 at 04:44
  • I use Netbeans, but I also don't use any form editors, I generally code my UI's by hand – MadProgrammer Oct 06 '15 at 04:56
  • anyway thanks for your opinions – Arone Asadas Oct 06 '15 at 05:04
  • Hope you find a solution ;) – MadProgrammer Oct 06 '15 at 05:05
  • 2
    Possible duplicate of [What is a stack trace, and how can I use it to debug my application errors?](http://stackoverflow.com/questions/3988788/what-is-a-stack-trace-and-how-can-i-use-it-to-debug-my-application-errors) – DroidDev Oct 20 '15 at 09:03
  • @DroidDev That would be the case of the error was in the application of the OP, instead it is in tooling provided by Eclipse. – Mark Rotteveel Oct 20 '15 at 09:37

0 Answers0