Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Exception: No context available outside of the request service lifecycle
Exception: No context available outside of the request service lifecycle [message #52468] Wed, 17 October 2007 12:46 Go to next message
Alexander Forschnr is currently offline Alexander ForschnrFriend
Messages: 21
Registered: July 2009
Junior Member
As I'm not sure, what to do with the illegalStateException, I'm getting
in my project, I'll put the Stacktrace at the end of this question and
hope, that someone can tell me, where to start my quest for the source
of this error.

Please tell me, what specific information you need to help me out.

Thanks a lot.
Alex

Exception in thread "StartAction_0996d074-d8c2-4ca7-ba36-d7d98b1687ca"
java.lang.IllegalStateException: No context available outside of the
request service lifecycle.
at org.eclipse.rwt.internal.service.ContextProvider.getContext( Unknown
Source)
at
org.eclipse.rwt.internal.service.ContextProvider.getStateInf o(Unknown
Source)
at org.eclipse.rwt.SessionSingletonBase.getInstance(Unknown Source)
at org.eclipse.ui.internal.Workbench.getInstance(Unknown Source)
at org.eclipse.ui.PlatformUI.getWorkbench(Unknown Source)
at
de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.createP arentSWTContext(EclipseGUIManager.java:198)
at
de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.getGUIC ontext(EclipseGUIManager.java:130)
at
de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startOrResumeActivity(DefaultRu ntimeManager.java:278)
at
de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startActivity(DefaultRuntimeMan ager.java:184)
at
de.aristaflow.adept2.core.executionmanager.defaultimplementa tion.DefaultExecutionManager.startActivity(DefaultExecutionM anager.java:2667)
at
de.aristaflow.adept2.ui.worklistvisualizationplugin.actions. StartAction$1.run(StartAction.java:72)
at java.lang.Thread.run(Unknown Source)
Re: Exception: No context available outside of the request service lifecycle [message #53092 is a reply to message #52468] Thu, 18 October 2007 08:11 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

RAP differs from RCP in a way that RCP applications don't have to deal with
session scopes but RAP applications have to. In RCP for example you can get
access the one and only UI representation instance (your workbench) from
every part of the code since application scope and session scope are
inplicitly the same.

Since you have a multi user environment in RAP (=> multiple Sessions at a
time) but only one application wide equinox instance running which is shared
between those sessions (application scope) things getting a little bit more
complicated. Each session has its own workbench instance since the state of
the UIs differ between sessions. So in principle you can easily access the
core from the UI, but the other way round isn't possible without additional
code.

So what's happening in your code is that you try to access your GUI layer
(session scope) from the bundle activator (application scope), which isn't
possible as I just explained. The bad news is that this is one of the low
level things we can't do anything about it since this is inherent to server
side technologies. But most of the time it is easy to move the code from the
activator to the EntryPoint implementation of your app. The execution of the
IEntryPoint#createUI method belongs of course to the session scope, so there
won't be any IllegalStateExceptions thrown (At least not for the reasons I
mentioned above...).

Hope that helps.


Ciao
Frank

"Alexander Forschner" <alexander.forschner@uni-ulm.de> schrieb im
Newsbeitrag news:ff507a$9qp$1@build.eclipse.org...
> As I'm not sure, what to do with the illegalStateException, I'm getting in
> my project, I'll put the Stacktrace at the end of this question and hope,
> that someone can tell me, where to start my quest for the source of this
> error.
>
> Please tell me, what specific information you need to help me out.
>
> Thanks a lot.
> Alex
>
> Exception in thread "StartAction_0996d074-d8c2-4ca7-ba36-d7d98b1687ca"
> java.lang.IllegalStateException: No context available outside of the
> request service lifecycle.
> at org.eclipse.rwt.internal.service.ContextProvider.getContext( Unknown
> Source)
> at org.eclipse.rwt.internal.service.ContextProvider.getStateInf o(Unknown
> Source)
> at org.eclipse.rwt.SessionSingletonBase.getInstance(Unknown Source)
> at org.eclipse.ui.internal.Workbench.getInstance(Unknown Source)
> at org.eclipse.ui.PlatformUI.getWorkbench(Unknown Source)
> at
> de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.createP arentSWTContext(EclipseGUIManager.java:198)
> at
> de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.getGUIC ontext(EclipseGUIManager.java:130)
> at
> de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startOrResumeActivity(DefaultRu ntimeManager.java:278)
> at
> de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startActivity(DefaultRuntimeMan ager.java:184)
> at
> de.aristaflow.adept2.core.executionmanager.defaultimplementa tion.DefaultExecutionManager.startActivity(DefaultExecutionM anager.java:2667)
> at
> de.aristaflow.adept2.ui.worklistvisualizationplugin.actions. StartAction$1.run(StartAction.java:72)
> at java.lang.Thread.run(Unknown Source)
Previous Topic:Applet as substitute for SWT/AWT Bridged component?
Next Topic:Access to org.eclipse.swt.widgets.Composite forbidden
Goto Forum:
  


Current Time: Sun Sep 22 20:22:41 GMT 2024

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

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

Back to the top