Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem with (my first) RAP Workbench Application
Problem with (my first) RAP Workbench Application [message #1711709] Mon, 19 October 2015 12:10 Go to next message
Lars t Christmas is currently offline Lars t ChristmasFriend
Messages: 8
Registered: October 2015
Junior Member
Hi,

i'm new in rap programming and tried to learn how to create my own RAP Workbench Application by looking at the tutorial code (org.eclipse.rap.demo workbench).

now i tried to "copy" the code neccessary to just run my application with raw window in the browser. But i get following error:

eclipse.buildId=unknown
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments: -dev file:C:/Users/ldehler/workspaceMars2/.metadata/.plugins/org.eclipse.pde.core/PDT/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console -data C:\Users\ldehler\workspaceMars2/.metadata/.plugins/org.eclipse.rap.tools.launch/PDT

!ENTRY org.eclipse.rap.rwt.osgi 4 0 2015-10-19 13:34:45.998
!MESSAGE Unable to start RWT application.
!STACK 0
java.lang.RuntimeException: org.eclipse.equinox.http.servlet.internal.error.PatternInUseException: Pattern already in use: /
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerServlet(ApplicationReferenceImpl.java:194)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerServlets(ApplicationReferenceImpl.java:90)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.startRWTApplication(ApplicationReferenceImpl.java:79)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.start(ApplicationReferenceImpl.java:64)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.doLaunch(ApplicationLauncherImpl.java:105)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launch(ApplicationLauncherImpl.java:87)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launch(ApplicationLauncherImpl.java:164)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launchAtHttpService(ApplicationLauncherImpl.java:141)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.addHttpService(ApplicationLauncherImpl.java:49)
at org.eclipse.rap.rwt.osgi.internal.HttpTracker.addingService(HttpTracker.java:30)
at org.eclipse.rap.rwt.osgi.internal.HttpTracker.addingService(HttpTracker.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:159)
at org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:998)
at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:58)
at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.init(ProxyServlet.java:36)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.init(HttpServerManager.java:333)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start(Server.java:387)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:354)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.updated(HttpServerManager.java:143)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Activator.java:62)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: org.eclipse.equinox.http.servlet.internal.error.PatternInUseException: Pattern already in use: /
at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.registerHttpServiceServlet(HttpServiceRuntimeImpl.java:756)
at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$3.run(HttpServiceImpl.java:147)
at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$3.run(HttpServiceImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerServlet(HttpServiceImpl.java:144)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerServlet(ApplicationReferenceImpl.java:190)
... 75 more


i cant find any solution or hint whats wrong on the web. I search in the forum too but could not find a matching topic. Hopefully i havent missed something there.

Best regards

lars
Re: Problem with (my first) RAP Workbench Application [message #1711967 is a reply to message #1711709] Tue, 20 October 2015 13:10 Go to previous messageGo to next message
Tiburon T is currently offline Tiburon TFriend
Messages: 61
Registered: October 2011
Member
Hi,

this looks as if there are two EntryPoints for "/" defined in your application. Did you add an extra entry point extension or something like that?

Greetings
Tibu

[Updated on: Tue, 20 October 2015 13:11]

Report message to a moderator

Re: Problem with (my first) RAP Workbench Application [message #1712335 is a reply to message #1711967] Fri, 23 October 2015 07:32 Go to previous messageGo to next message
Lars t Christmas is currently offline Lars t ChristmasFriend
Messages: 8
Registered: October 2015
Junior Member
Hi Tibu,

thanks for your answer. In my first project I tried out a bunch of things but that results in the console only showing "osgi>" after i ran the project and not even starting the equinox container or the jetty server. So i created a new project, created a new class that implements an EntryPoint. It looks like:

import org.eclipse.rap.rwt.application.EntryPoint;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.WorkbenchAdvisor;


public class MyEntryPoint implements EntryPoint{

@Override
public int createUI() {
WorkbenchAdvisor workbenchAdvisor = new MyWorkbenchAdvisor();

Display display = PlatformUI.createDisplay();
System.out.println("try to run workbench"); // debug
int result = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
System.out.println("workbench closed"); // debug
display.dispose();
return result;
}

}

The class "MyWorkbenchAdvisor" is just a raw extension of the WorkbenchAdvisor class:

import org.eclipse.ui.application.WorkbenchAdvisor;

public class MyWorkbenchAdvisor extends WorkbenchAdvisor{

@Override
public String getInitialWindowPerspectiveId() {
// TODO Auto-generated method stub
return null;
}
}

My plugin.xml looks like:

<plugin>
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="com.lars.RAPsecond.MyEntryPoint"
id="com.lars.RAPsecond.entrypoint1"
path="/urlPath">
</entrypoint>
</extension>

</plugin>

When i run this as RAP Application with servlet Path = "urlPath" it throws nearly the same exception:


!ENTRY org.eclipse.rap.rwt.osgi 4 0 2015-10-23 09:19:56.546
!MESSAGE Unable to start RWT application.
!STACK 0
java.lang.RuntimeException: org.eclipse.equinox.http.servlet.internal.error.PatternInUseException: Pattern already in use: /rwt-resources
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerResourceDirectory(ApplicationReferenceImpl.java:206)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.startRWTApplication(ApplicationReferenceImpl.java:80)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.start(ApplicationReferenceImpl.java:64) ...... (and many more)
try to run workbench

but this time the pattern isnt just "/" but "/rwt-resources" ... i never wrote that somewhere in any field by myself so where does it come from? ^^

and another strange thing is that i can access the workbench in the browser now by "localhost:<port>/urlPath" and when i close it the console shows my debug output below the "runWorkbench" method. Tbh that is realy confusing me Very Happy ... because it seems to me that i did everything as it is shown in the example codes but there its just working -,-

Maybe you've got an other idea what might be the problem here Smile

Best regards

lars
Re: Problem with (my first) RAP Workbench Application [message #1712341 is a reply to message #1712335] Fri, 23 October 2015 08:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
please ensure that there are no RAP demo bundles selected in your launch
configuration.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Problem with (my first) RAP Workbench Application [message #1712543 is a reply to message #1712341] Mon, 26 October 2015 10:26 Go to previous message
Lars t Christmas is currently offline Lars t ChristmasFriend
Messages: 8
Registered: October 2015
Junior Member
Thanks Ivan,

i thought i deselected every demo bundle in the run configuration but
i missed some "demo" bundles in the target platform configuration.

after deselecting every bundle that had the word "demo" in its label it finally started without any error Smile

thanks for your help guys Very Happy


grettings

lars
Previous Topic:table cell selection theming
Next Topic:RAP Locale translation of MessageBox buttons
Goto Forum:
  


Current Time: Tue Mar 19 11:46:15 GMT 2024

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

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

Back to the top