|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
Originally posted by: fappel.innoopract.com|
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
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
Hope that helps.
"Alexander Forschner" <firstname.lastname@example.org> schrieb im
> 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
> Please tell me, what specific information you need to help me out.
> Thanks a lot.
> 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
> at org.eclipse.rwt.internal.service.ContextProvider.getStateInf o(Unknown
> 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)
> de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.createP arentSWTContext(EclipseGUIManager.java:198)
> de.aristaflow.adept2.ui.guimanager.EclipseGUIManager.getGUIC ontext(EclipseGUIManager.java:130)
> de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startOrResumeActivity(DefaultRu ntimeManager.java:278)
> de.aristaflow.adept2.core.runtimeenvironment.defaultimplemen tation.DefaultRuntimeManager.startActivity(DefaultRuntimeMan ager.java:184)
> de.aristaflow.adept2.core.executionmanager.defaultimplementa tion.DefaultExecutionManager.startActivity(DefaultExecutionM anager.java:2667)
> de.aristaflow.adept2.ui.worklistvisualizationplugin.actions. StartAction$1.run(StartAction.java:72)
> at java.lang.Thread.run(Unknown Source)
Powered by FUDForum
. Page generated in 0.01455 seconds