Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » HELP: java.lang.IllegalStateException: Workspace is closed.
HELP: java.lang.IllegalStateException: Workspace is closed. [message #60777] Tue, 03 May 2005 19:22 Go to next message
Eclipse UserFriend
Originally posted by: a.b.c

Hi all,
I'm writing a plugin, and I'm blocked on a strange behavior. My plugin
contains a wizard, and as soon as I start a debug session for it and try
to open the wizard I get the following message on the console:

Unhandled event loop exception
Reason:
Workspace is closed.

In the .log file, I find the exception shown at the end of this
messasge. I'm running Eclipse 3.1 M6. I've tried to debug the problem,
and here is what I'm seeing. The exception happens because when
ResourcesPlugin.getWorkspace() is called ResourcesPlugin.workspace is
null. The filed is set to null only in two places: at static
initialization (when the class is loaded), and in the shutdown() method.
I've placed a Watch on the workspace variable, and I do see it being
initialized with a valid instance before the debugged Workbench shows
up. However, when I try to open my wizard, I end up in the exception
without seing any more assignment to the workspace variable.

Can someone give me a hint? I'm totally lost!

Thank you,

Federica



java.lang.IllegalStateException: Workspace is closed.
at
org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:320)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateTreeViewer(ContainerSelectionGroup.java:255)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateContents(ContainerSelectionGroup.java:205)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.<init >(ContainerSelectionGroup.java:142)
at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.c reateContents(ResourceAndContainerGroup.java:174)
at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.<init >(ResourceAndContainerGroup.java:135)
at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.createContr ol(WizardNewFileCreationPage.java:189)
at
teja.TejaViewerCreationWizard$CreationPage.createControl(Tej aViewerCreationWizard.java:60)
at
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1020)
at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog. java:1013)
at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.jav a:1003)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1001)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:753)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:345)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:556)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:803 )
at org.eclipse.jface.window.Window.open(Window.java:781)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:181)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:538)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:306)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:228)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
at org.eclipse.core.launcher.Main.run(Main.java:942)
at org.eclipse.core.launcher.Main.main(Main.java:926)
Re: java.lang.IllegalStateException: Workspace is closed. [message #60781 is a reply to message #60777] Tue, 03 May 2005 19:59 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Wrong newsgroup.

"Federica" <a@b.c> wrote in message news:d58jd6$u5q$1@news.eclipse.org...
> Hi all,
> I'm writing a plugin, and I'm blocked on a strange behavior. My plugin
> contains a wizard, and as soon as I start a debug session for it and try
> to open the wizard I get the following message on the console:
>
> Unhandled event loop exception
> Reason:
> Workspace is closed.
>
> In the .log file, I find the exception shown at the end of this
> messasge. I'm running Eclipse 3.1 M6. I've tried to debug the problem,
> and here is what I'm seeing. The exception happens because when
> ResourcesPlugin.getWorkspace() is called ResourcesPlugin.workspace is
> null. The filed is set to null only in two places: at static
> initialization (when the class is loaded), and in the shutdown() method.
> I've placed a Watch on the workspace variable, and I do see it being
> initialized with a valid instance before the debugged Workbench shows
> up. However, when I try to open my wizard, I end up in the exception
> without seing any more assignment to the workspace variable.
>
> Can someone give me a hint? I'm totally lost!
>
> Thank you,
>
> Federica
>
>
>
> java.lang.IllegalStateException: Workspace is closed.
> at
>
org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java
:320)
> at
>
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateTreeViewer(Co
ntainerSelectionGroup.java:255)
> at
>
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateContents(Cont
ainerSelectionGroup.java:205)
> at
>
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.<init >(ContainerSel
ectionGroup.java:142)
> at
>
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.c reateContents(Re
sourceAndContainerGroup.java:174)
> at
>
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.<init >(ResourceAn
dContainerGroup.java:135)
> at
>
org.eclipse.ui.dialogs.WizardNewFileCreationPage.createContr ol(WizardNewFile
CreationPage.java:189)
> at
>
teja.TejaViewerCreationWizard$CreationPage.createControl(Tej aViewerCreationW
izard.java:60)
> at
>
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1020)
> at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog. java:1013)
> at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.jav a:1003)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1001)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:753)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:345)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:556)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:803 )
> at org.eclipse.jface.window.Window.open(Window.java:781)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:181)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:996 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:538)
> at
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:488)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
tionItem.java:400)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1570)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:306)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:103)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:228)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:344)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:156)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
> at org.eclipse.core.launcher.Main.run(Main.java:942)
> at org.eclipse.core.launcher.Main.main(Main.java:926)
Re: java.lang.IllegalStateException: Workspace is closed. [message #60782 is a reply to message #60781] Tue, 03 May 2005 20:22 Go to previous message
Eclipse UserFriend
Originally posted by: a.b.c

Pratik Shah wrote:

> Wrong newsgroup.
>
> "Federica" <a@b.c> wrote in message news:d58jd6$u5q$1@news.eclipse.org...
>
>>Hi all,
>>I'm writing a plugin, and I'm blocked on a strange behavior. My plugin
>>contains a wizard, and as soon as I start a debug session for it and try
>>to open the wizard I get the following message on the console:
>>
>>Unhandled event loop exception
>>Reason:
>>Workspace is closed.
>>
>>In the .log file, I find the exception shown at the end of this
>>messasge. I'm running Eclipse 3.1 M6. I've tried to debug the problem,
>>and here is what I'm seeing. The exception happens because when
>>ResourcesPlugin.getWorkspace() is called ResourcesPlugin.workspace is
>>null. The filed is set to null only in two places: at static
>>initialization (when the class is loaded), and in the shutdown() method.
>>I've placed a Watch on the workspace variable, and I do see it being
>>initialized with a valid instance before the debugged Workbench shows
>>up. However, when I try to open my wizard, I end up in the exception
>>without seing any more assignment to the workspace variable.
>>
>>Can someone give me a hint? I'm totally lost!
>>
>> Thank you,
>>
>> Federica
>>
>>
>>
>>java.lang.IllegalStateException: Workspace is closed.
>>at
>>
>
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java
> :320)
>
>>at
>>
>
> org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateTreeViewer(Co
> ntainerSelectionGroup.java:255)
>
>>at
>>
>
> org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.cre ateContents(Cont
> ainerSelectionGroup.java:205)
>
>>at
>>
>
> org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.<init >(ContainerSel
> ectionGroup.java:142)
>
>>at
>>
>
> org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.c reateContents(Re
> sourceAndContainerGroup.java:174)
>
>>at
>>
>
> org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.<init >(ResourceAn
> dContainerGroup.java:135)
>
>>at
>>
>
> org.eclipse.ui.dialogs.WizardNewFileCreationPage.createContr ol(WizardNewFile
> CreationPage.java:189)
>
>>at
>>
>
> teja.TejaViewerCreationWizard$CreationPage.createControl(Tej aViewerCreationW
> izard.java:60)
>
>>at
>>
>
> org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1020)
>
>>at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog. java:1013)
>>at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.jav a:1003)
>>at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1001)
>>at
>
> org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:753)
>
>>at
>> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:345)
>>at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:556)
>>at
>
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
>
>>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
>>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
>>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
>>at org.eclipse.jface.window.Window.runEventLoop(Window.java:803 )
>>at org.eclipse.jface.window.Window.open(Window.java:781)
>>at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.j ava:181)
>>at org.eclipse.jface.action.Action.runWithEvent(Action.java:996 )
>>at
>>
>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:538)
>
>>at
>>
>
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:488)
>
>>at
>>
>
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
> tionItem.java:400)
>
>>at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
>>at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2894)
>>at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2527)
>>at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1570)
>>at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
>>at
>>
>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:306)
>
>>at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
>>at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:103)
>>at
>>
>
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:228)
>
>>at
>>
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:344)
>
>>at
>>
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:156)
>
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at
>>
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
>
>>at
>>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
>
>>at java.lang.reflect.Method.invoke(Method.java:324)
>>at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315 )
>>at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
>>at org.eclipse.core.launcher.Main.run(Main.java:942)
>>at org.eclipse.core.launcher.Main.main(Main.java:926)
>
>
>
can you suggest the newsgruop where to post it?

thank you

Federica
Previous Topic:Does Java 1.5 work in Eclipse Platform 3.0.2?
Next Topic:Opening an already existing workspace
Goto Forum:
  


Current Time: Wed Jul 17 16:19:05 GMT 2024

Powered by FUDForum. Page generated in 0.08185 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top