Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » [SOLVED] RAP E4 - PatternInUseException(How to get full log ? Why /rwt-resources already in use ?)
[SOLVED] RAP E4 - PatternInUseException [message #1719345] Thu, 07 January 2016 11:30 Go to next message
Eclipse UserFriend
I have a very weird Exception when running my Eclipse E4 RAP app.

!SESSION 2016-01-07 12:14:14.972 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Command-line arguments:  -dev file:D:/Workspace Eclipse/Eclipse RAP/.metadata/.plugins/org.eclipse.pde.core/yaouh/dev.properties -os win32 -ws win32 -arch x86_64 -console -consolelog -data D:\Workspace Eclipse\Eclipse RAP/.metadata/.plugins/org.eclipse.rap.tools.launch/yaouh

!ENTRY org.eclipse.rap.rwt.osgi 4 0 2016-01-07 12:14:16.817
!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)
	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.launchWithConfiguration(ApplicationLauncherImpl.java:151)
	at org.eclipse.rap.rwt.osgi.internal.ApplicationLauncherImpl.addConfiguration(ApplicationLauncherImpl.java:66)
	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: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.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
	at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:260)
	at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
	at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
	at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
	at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
	at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.equinox.http.servlet.internal.error.PatternInUseException: Pattern already in use: /rwt-resources
	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.registerHttpServiceResources(HttpServiceRuntimeImpl.java:647)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$2.run(HttpServiceImpl.java:121)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$2.run(HttpServiceImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerResources(HttpServiceImpl.java:118)
	at org.eclipse.rap.rwt.osgi.internal.ApplicationReferenceImpl.registerResourceDirectory(ApplicationReferenceImpl.java:202)
	... 31 more


Do you know where to search in Eclipse to get the full exception log ?

This Exception happen just after the start of the application = after BasicApplication .configure(application) is completed :
public class BasicApplication implements ApplicationConfiguration {

    public void configure(Application application) {
    	System.out.println("Start running app");
        Map<String, String> properties = new HashMap<String, String>();
        properties.put(WebClient.PAGE_TITLE, "Hello e4 RAP");
        application.addEntryPoint("/hello", new E4EntryPointFactory(E4ApplicationConfig.create("platform:/plugin/yaouh/Application.e4xmi")), properties);
        application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
        System.out.println("app runned");
        
        /*
         * initDatabase
         */
	initialize();
		
	System.out.println("App runned");
    }
}

Runs perfectly!

But then I got the Exception just when the application is displayed.
Does someone has an idea ?

[Updated on: Wed, 20 January 2016 11:42] by Moderator

Report message to a moderator

Re: RAP E4 - PatternInUseException [message #1719346 is a reply to message #1719345] Thu, 07 January 2016 11:36 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 make sure that there are no RAP demo bundles selected in your
launch configuration.
Best,
Ivan

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP E4 - PatternInUseException [message #1719347 is a reply to message #1719346] Thu, 07 January 2016 11:45 Go to previous messageGo to next message
Eclipse UserFriend
I saw in a previous post that you should check this, so I did.
And I have no demo bundle in my launch configuration.
Re: RAP E4 - PatternInUseException [message #1719352 is a reply to message #1719347] Thu, 07 January 2016 12:15 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Do you have old rap.workbench (3.7) bundle selected?

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP E4 - PatternInUseException [message #1719373 is a reply to message #1719352] Thu, 07 January 2016 14:26 Go to previous messageGo to next message
Eclipse UserFriend
No, I don't see it.
Here is the bundles included in my launch configuration:

com.ibm.icu.base     @default:default
javax.annotation     @default:default
javax.inject     @default:default
javax.servlet     @default:default
javax.xml     @default:default
org.apache.commons.fileupload     @default:default
org.apache.commons.io     @default:default
org.apache.commons.jxpath     @default:default
org.apache.felix.gogo.runtime     @default:default
org.apache.felix.gogo.shell     @default:default
org.eclipse.core.commands     @default:default
org.eclipse.core.contenttype     @default:default
org.eclipse.core.databinding.observable     @default:default
org.eclipse.core.databinding.property     @default:default
org.eclipse.core.databinding     @default:default
org.eclipse.core.expressions     @default:default
org.eclipse.core.jobs     @default:default
org.eclipse.core.runtime*3.11.1.v20150903-1804@default:true
org.eclipse.e4.core.commands     @default:default
org.eclipse.e4.core.contexts     @default:default
org.eclipse.e4.core.di.annotations     @default:default
org.eclipse.e4.core.di.extensions     @default:default
org.eclipse.e4.core.di     @default:default
org.eclipse.e4.core.services     @default:default
org.eclipse.e4.emf.xpath     @default:default
org.eclipse.e4.ui.bindings     @default:default
org.eclipse.e4.ui.di     @default:default
org.eclipse.e4.ui.model.workbench     @default:default
org.eclipse.e4.ui.services     @default:default
org.eclipse.e4.ui.workbench.addons.swt     @default:default
org.eclipse.e4.ui.workbench.renderers.swt     @default:default
org.eclipse.e4.ui.workbench.swt     @default:default
org.eclipse.e4.ui.workbench     @default:default
org.eclipse.emf.common     @default:default
org.eclipse.emf.ecore.change     @default:default
org.eclipse.emf.ecore.xmi     @default:default
org.eclipse.emf.ecore     @default:default
org.eclipse.equinox.app     @default:default
org.eclipse.equinox.common@2:true
org.eclipse.equinox.console     @default:default
org.eclipse.equinox.ds@1:true
org.eclipse.equinox.event     @default:default
org.eclipse.equinox.http.jetty * 3.1.1.v20150818-2108     @default:default
org.eclipse.equinox.http.registry     @default:default
org.eclipse.equinox.http.servlet * 1.2.1.v20150828-1818     @default:default
org.eclipse.equinox.preferences     @default:default
org.eclipse.equinox.registry     @default:default
org.eclipse.equinox.util     @default:default
org.eclipse.help     @default:default
org.eclipse.jetty.http * 9.2.13.v20150730     @default:default
org.eclipse.jetty.io * 9.2.13.v20150730     @default:default
org.eclipse.jetty.security * 9.2.13.v20150730     @default:default
org.eclipse.jetty.server * 9.2.13.v20150730     @default:default
org.eclipse.jetty.servlet * 9.2.13.v20150730     @default:default
org.eclipse.jetty.util * 9.2.13.v20150730     @default:default
org.eclipse.osgi * 3.10.101.v20150820-1432@-1:true
org.eclipse.osgi.services     @default:default
org.eclipse.rap.e4     @default:default
org.eclipse.rap.filedialog     @default:default
org.eclipse.rap.fileupload     @default:default
org.eclipse.rap.jface.databinding     @default:default
org.eclipse.rap.jface     @default:default
org.eclipse.rap.rwt.osgi     @default:default
org.eclipse.rap.rwt.testfixture     @default:default
org.eclipse.rap.rwt     @default:default
org.eclipse.rap.ui.workbench     @default:default
org.eclipse.rap.ui     @default:default
org.hamcrest.core     @default:default
org.junit     @default:default
Re: RAP E4 - PatternInUseException [message #1719379 is a reply to message #1719373] Thu, 07 January 2016 14:46 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,
you mix the old and new workbench. Remove:
org.eclipse.rap.ui.workbench
org.eclipse.rap.ui
aslo you don't need the test bundles and their dependencies:
org.eclipse.rap.rwt.testfixture
org.hamcrest.core
HTH,
Ivan

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP E4 - PatternInUseException [message #1720706 is a reply to message #1719379] Wed, 20 January 2016 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Thank you so much for your reply!!!

I thought so but in fact I had not switch totally to Eclipse e4.
I was still using some: PlatformUI.getDefault()... call
Thus the need of:
org.eclipse.rap.ui.workbench
org.eclipse.rap.ui

I removed totally now these dependices and my e4.rap project runs perfectly!

Thank you again!

Re: [SOLVED] RAP E4 - PatternInUseException [message #1724785 is a reply to message #1719345] Fri, 26 February 2016 04:13 Go to previous message
Petra Seitz is currently offline Petra SeitzFriend
Messages: 1
Registered: December 2015
Junior Member
Hello

Import the Bundle org.eclipse.equinox.http.servlet
On the Class
org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl
find the line
if (existing != null) {
throw new PatternInUseException(alias);
}
Fix the Problem:
if (existing != null) {
// TODO ignore;
// throw new PatternInUseException(alias);
}
Now you have to register all your image by yourself!

Regards Petra
Previous Topic:[SOLVED] RAP E4 - Window properties and Tags
Next Topic:Deploy rwt standalone not work
Goto Forum:
  


Current Time: Fri Apr 26 17:01:13 GMT 2024

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

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

Back to the top