Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » The alias '/rwt-resources' is already in use.
The alias '/rwt-resources' is already in use. [message #886676] Fri, 15 June 2012 12:19 Go to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

I have implemented the simple RWT application: http://www.eclipse.org/rap/developers-guide/devguide.php?topic=getting-started/hello-world.html

Run with RWT launch config works fine.

Now I want to run it as OSGi and have created an ApplicationConfiuration that registers itself as a service.

When I now use a RAP launch config I keep getting the error:

The alias '/rwt-resources' is already in use.

I have confirmed that there is only one ApplicationConfiuration. In fact, I only have one bundle with two classes, the entry point with the button and the ApplicationConfiuration.

I am using Juno RC3 as development environment.

Thanks for helping,

Wim

0 ACTIVE org.eclipse.osgi_3.8.0.v20120529-1548
Fragments=34
1 ACTIVE javax.servlet_3.0.0.v201112011016
2 ACTIVE org.eclipse.rap.ui_1.5.0.20120605-1606
3 ACTIVE org.eclipse.core.contenttype_3.4.200.v20120523-2004
4 ACTIVE org.eclipse.rap.rwt_1.5.0.20120605-1606
5 ACTIVE org.eclipse.equinox.registry_3.5.200.v20120522-1841
6 ACTIVE org.eclipse.equinox.console_1.0.0.v20120522-1841
7 ACTIVE org.eclipse.rap.jface.databinding_1.5.0.20120605-1606
8 ACTIVE org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841
9 ACTIVE com.remainsoftware.server.rap_1.0.0.qualifier
10 ACTIVE org.eclipse.equinox.app_1.3.100.v20120522-1841
11 ACTIVE org.eclipse.core.expressions_3.4.400.v20120523-2004
12 ACTIVE org.apache.felix.gogo.runtime_0.8.0.v201108120515
13 ACTIVE org.eclipse.jetty.servlet_8.1.3.v20120522
14 ACTIVE org.eclipse.jetty.security_8.1.3.v20120522
15 ACTIVE org.apache.felix.gogo.command_0.8.0.v201108120515
16 ACTIVE org.eclipse.equinox.http.registry_1.1.200.v20120522-2049
17 ACTIVE org.eclipse.rap.jface_1.5.0.20120605-1606
18 ACTIVE org.eclipse.core.databinding.property_1.4.100.v20120523-1955
19 ACTIVE org.eclipse.jetty.server_8.1.3.v20120522
20 ACTIVE org.eclipse.core.commands_3.6.1.v20120521-2329
21 ACTIVE org.eclipse.core.databinding_1.4.1.v20120521-2329
22 ACTIVE org.eclipse.core.jobs_3.5.200.v20120521-2346
23 ACTIVE org.eclipse.jetty.continuation_8.1.3.v20120522
24 ACTIVE org.eclipse.osgi.services_3.3.100.v20120522-1822
25 ACTIVE org.eclipse.rap.rwt.osgi_1.5.0.20120605-1606
26 ACTIVE org.eclipse.help_3.6.0.v20120521-2344
27 ACTIVE com.ibm.icu.base_4.4.2.v20110831
28 ACTIVE org.eclipse.jetty.util_8.1.3.v20120522
29 ACTIVE org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841
30 ACTIVE org.eclipse.equinox.common_3.6.100.v20120522-1841
31 ACTIVE org.apache.felix.gogo.shell_0.8.0.v201110170705
32 ACTIVE org.eclipse.equinox.ds_1.4.0.v20120522-1841
33 ACTIVE org.eclipse.jetty.http_8.1.3.v20120522
34 RESOLVED org.eclipse.equinox.servletbridge.extensionbundle_1.2.100.v20120522-2049
Master=0
35 ACTIVE org.eclipse.rap.ui.forms_1.5.0.20120605-1606
36 ACTIVE org.eclipse.rap.ui.workbench_1.5.0.20120605-1606
37 ACTIVE org.eclipse.equinox.preferences_3.5.0.v20120522-1841
38 ACTIVE org.eclipse.rap.ui.views_1.5.0.20120605-1606
39 ACTIVE org.eclipse.jetty.io_8.1.3.v20120522
40 ACTIVE org.eclipse.core.runtime_3.8.0.v20120521-2346
41 ACTIVE org.eclipse.equinox.util_1.0.400.v20120522-2049
42 ACTIVE org.eclipse.core.databinding.observable_1.4.1.v20120521-2329

===================


2012-06-15 14:07:24.470:INFO:oejs.Server:jetty-8.1.3.v20120522
2012-06-15 14:07:24.510:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:55725
osgi> started
!SESSION 2012-06-15 14:07:22.348 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_02
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -dev file:C:/Users/jongw/workspaces/gravity/.metadata/.plugins/org.eclipse.pde.core/RAP Application2/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console -data C:\Users\jongw\workspaces\gravity/.metadata/.plugins/org.eclipse.rap.ui.launch/RAPApplicationq

!ENTRY org.eclipse.rap.rwt.osgi 4 0 2012-06-15 14:07:26.544
!MESSAGE Unable to start RWT application.
!STACK 0
java.lang.RuntimeException: org.osgi.service.http.NamespaceException: The alias '/rwt-resources' is already in use.
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerResourceDirectory(ApplicationReferenceImpl.java:194)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.startRWTApplication(ApplicationReferenceImpl.java:79)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.start(ApplicationReferenceImpl.java:63)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.doLaunch(ApplicationLauncherImpl.java:103)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launch(ApplicationLauncherImpl.java:85)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launch(ApplicationLauncherImpl.java:162)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.launchWithConfiguration(ApplicationLauncherImpl.java:149)
at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.addConfiguration(ApplicationLauncherImpl.java:64)
at org.eclipse.rap.rwt.osgi.internal.ApplicationConfigurationTracker.addingService(ApplicationConfigurationTracker.java:35)
at org.eclipse.rap.rwt.osgi.internal.ApplicationConfigurationTracker.addingService(ApplicationConfigurationTracker.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
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.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
at org.eclipse.rap.rwt.osgi.internal.Activator.openConfiguratorTracker(Activator.java:55)
at org.eclipse.rap.rwt.osgi.internal.Activator.start(Activator.java:28)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1177)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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.osgi.service.http.NamespaceException: The alias '/rwt-resources' is already in use.
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.registerServlet(ProxyServlet.java:164)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.registerResources(ProxyServlet.java:194)
at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerResources(HttpServiceImpl.java:78)
at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerResourceDirectory(ApplicationReferenceImpl.java:190)
... 32 more
Re: The alias '/rwt-resources' is already in use. [message #886698 is a reply to message #886676] Fri, 15 June 2012 13:32 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

I fixed it by removing the service registration and switching to extension points. A bug? If you want me to file one please say when.

To solve the problem, I first switched to the latest release target. There was no ApplicationConfiguration so I defined extension points. This worked fine so I decided to try this for the latest stable release (and juno RC3) as well.

Regards,

Wim
Re: The alias '/rwt-resources' is already in use. [message #888506 is a reply to message #886698] Mon, 18 June 2012 08:00 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Wim,

this is a known problem that occurs when you have the workbench bundle
running AND use the ApplicationConfiguration API. This API is meant for
lightweight applications without the entire eclipse stack. The issue is
already covered by bug 377414 [1].

If you don't use the workbench, I'd recommend to leave out all the
org.eclipse.ui.* bundles. You can still use JFace, the extension
registry, eclipse core bundles, etc., but not the platform extension points.

Regards, Ralf


[1] 377414: OSGi integration not able to use together with workbench
https://bugs.eclipse.org/bugs/show_bug.cgi?id=377414

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: The alias '/rwt-resources' is already in use. [message #888671 is a reply to message #888506] Mon, 18 June 2012 13:09 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Thanks for the explanation Ralph, that cleared things up. If I am not mistaking, it seems that the ApplicationConfigurator still is documented towards RWT/No OSGi?

Thanks,

Wim
Re: The alias '/rwt-resources' is already in use. [message #889512 is a reply to message #888671] Tue, 19 June 2012 09:55 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Wim,

just yesterday I revised this part [1] in the dev guide and added an FAQ
entry [2] for the 'rwt-resources' is already in use exception. I hope
this makes it more clear now.

Best regards, Ralf


[1]
http://eclipse.org/rap/developers-guide/devguide.php?topic=advanced/application-configuration.html
[2]
http://wiki.eclipse.org/RAP/FAQ#NamespaceException:_The_alias_.27.2Frwt-resources.27_is_already_in_use

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: The alias '/rwt-resources' is already in use. [message #889827 is a reply to message #889512] Tue, 19 June 2012 19:43 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Excellent! Thanks.
Previous Topic:Offline capabilities with local storage
Next Topic:Setting different initial perspective possible?
Goto Forum:
  


Current Time: Thu Apr 25 23:39:57 GMT 2024

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

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

Back to the top