Hello guys,
i managed to get RAP working on Virgo following this this tutorial:
http://eclipsesource.com/blogs/tutorials/developing-web-application-bundles-with-rap-and-virgo/
Now i want to step further, and create an Eclipse Workbench Application, but when i access virgo i get the following exception:
2013-07-07 00:12:55.694] WARN qtp1716158245-89 org.eclipse.jetty.servlet.ServletHandler /daios java.lang.IllegalStateException: No context available outside of the request processing.
at org.eclipse.rap.rwt.internal.service.ContextProvider.getContext(ContextProvider.java:95)
at org.eclipse.rap.rwt.internal.service.ContextProvider.getUISession(ContextProvider.java:183)
at org.eclipse.swt.widgets.Display.setAppVersion(Display.java:2161)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:723)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:168)
at de.hswt.daios.ui.core.DaiosApplication.createUI(DaiosApplication.java:13)
at org.eclipse.rap.rwt.internal.lifecycle.PrepareUIRoot.execute(PrepareUIRoot.java:39)
at org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
at org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:136)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:122)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:75)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:66)
at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:119)
at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:106)
at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper.service(CutOffContextPathWrapper.java:106)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:386)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
I have read the FAQ, but i am a bit confused, becaus i dont do anything regarding the context (I believe...)
Here is my EntryPoint
public class MyApplication implements EntryPoint {
@Override
public int createUI() {
Display display = PlatformUI.createDisplay();
WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
return PlatformUI.createAndRunWorkbench(display, advisor);
}
}
Application WorkbenchSdvisor
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
private static final String PERSPECTIVE_ID = "de.hswt.daios.ui.search.perspective";
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
}
ApllicationConfiguration
public class DaiosApplicationConfiguration implements ApplicationConfiguration {
@Override
public void configure(Application application) {
Map<String, String> properties = new HashMap<String, String>();
properties.put(WebClient.PAGE_TITLE, "DAIOS");
application.addEntryPoint("/daios", DaiosApplication.class, properties);
}
}
Plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="id1"
point="org.eclipse.core.runtime.applications">
<application
cardinality="singleton-global"
thread="main"
visible="true">
<run
class="de.hswt.daios.ui.core.DaiosApplication">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
class="de.hswt.daios.ui.core.perspective.SearchPerspective"
id="de.hswt.daios.ui.search.perspective"
name="DAIOS">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
allowMultiple="false"
class="de.hswt.daios.ui.core.view.DaiosSearchView"
id="de.hswt.daios.ui.view.search.DaiosSearchView"
name="DAIOS"
restorable="true">
</view>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="de.hswt.daios.ui.search.perspective">
<view
closeable="false"
id="de.hswt.daios.ui.view.search.DaiosSearchView"
minimized="false"
moveable="false"
ratio="0.35"
relationship="left"
relative="org.eclipse.ui.editorss"
showTitle="false"
standalone="false"
visible="true">
</view>
</perspectiveExtension>
</extension>
</plugin>
If you need more information please feel free to ask.
Thanks in advance
Tobias