I'll add this to Jira, but I was trying to narrow this down even more....

In my own test code, I split it into 2 separate bundles - 1 containing the 
ServletContextHelper, the other containing the Servlet, both using 
DS/Whiteboard

if I stop and start the servlet bundle only, I see this:

g! stop 22
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STOPPING - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - ServiceEvent UNREGISTERING 
- [javax.servlet.Servlet] - TestCoreServlet.coreServlet
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker - 
Service removed [javax.servlet.Servlet]
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STOPPED - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - 
Starting destruction process for bundle TestCoreServlet.coreServlet
[Gogo shell] DEBUG org.ops4j.pax.web.extender.war.internal.Activator - Not 
an extended bundle or destruction of extension already finished for 
TestCoreServlet.coreServlet.
g! start 22
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STARTING - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - BundleEvent STARTED - 
TestCoreServlet.coreServlet
[Gogo shell] DEBUG TestCoreServlet.coreServlet - ServiceEvent REGISTERED - 
[javax.servlet.Servlet] - TestCoreServlet.coreServlet
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker - 
Service available [javax.servlet.Servlet]
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.ServletTracker - 
Creating web element for service 45 [javax.servlet.Servlet] 
(TestCore.Servlet.Example@9211a24).
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - 
de-registering 0 servlet filters
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - 
de-registering 0 welcomefilemappings
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - registering 
weblement:ServletWebElement{mapping=DefaultServletMapping{httpContextId=CustomContext,urlPatterns=[/web],initParams={},servlet=TestCore.Servlet.Example@9211a24,
 
alias=null, servletNameExample1}}
[Gogo shell] DEBUG org.ops4j.pax.web.service.internal.HttpServiceStarted - 
Using context 
[ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-2,name=context,httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1,contextParams={httpContext.shared=true,
 
webapp.context=context},virtualHosts={},connectors={}}]
[Gogo shell] DEBUG 
org.ops4j.pax.web.service.internal.ServletEventDispatcher - Sending web 
event ServletEvent [replay=false, type=1, 
bundle=21-TestCoreServlet.context, timestamp=1489628772443, alias=null, 
servletName=Example1, urlParameter=[Ljava.lang.String;@47984949, 
servletClass=TestCore.Servlet.Example], 
httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1]
 
for bundle TestCoreServlet.context
[ServletEventDispatcher: 3] DEBUG org.ops4j.pax.web.pax-web-jetty-bundle - 
org/osgi/service/web/DEPLOYING
[ServletEventDispatcher: 2] DEBUG org.ops4j.pax.web.pax-web-runtime - 
org/osgi/service/web/DEPLOYING
[Gogo shell] DEBUG org.ops4j.pax.web.service.jetty.internal.JettyServerImpl 
- Adding servlet 
[ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-4,name=Example1,urlPatterns=[/web],alias=null,servlet=TestCore.Servlet.Example@9211a24,initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-2,name=context,httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1,contextParams={httpContext.shared=true,
 
webapp.context=context},virtualHosts={},connectors={}}}]
[Gogo shell] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler@6e9175d8 
added {Example1@77578027==TestCore.Servlet.Example,-1,true,UNMANAGED}
[Gogo shell] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler@6e9175d8 
added {[/web]=>Example1,POJO}
[Gogo shell] DEBUG 
org.ops4j.pax.web.service.internal.ServletEventDispatcher - Sending web 
event ServletEvent [replay=false, type=5, 
bundle=21-TestCoreServlet.context, timestamp=1489628772446, alias=null, 
servletName=Example1, urlParameter=[Ljava.lang.String;@53e3ff33, 
servletClass=TestCore.Servlet.Example], 
httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@373185f1]
 
for bundle TestCoreServlet.context
[ServletEventDispatcher: 1] DEBUG org.ops4j.pax.web.pax-web-jetty-bundle - 
org/osgi/service/web/FAILED
[ServletEventDispatcher: 3] DEBUG org.ops4j.pax.web.pax-web-runtime - 
org/osgi/service/web/FAILED
[Gogo shell] ERROR 
org.ops4j.pax.web.extender.whiteboard.internal.WebApplication - 
Registration skipped for 
[ServletWebElement{mapping=DefaultServletMapping{httpContextId=CustomContext,urlPatterns=[/web],initParams={},servlet=TestCore.Servlet.Example@9211a24,
 
alias=null, servletNameExample1}}] due to error during registration
java.lang.IllegalStateException: Multiple servlets map to path: /web: 
Example1,Example1

It looks like the WebElement is never destroyed and removed when stopping 
the Servlet Bundle - what makes this worse is that the WebElement *is still 
accessible* via the original web path

if I just stop/start the Context bundle, this is where the original warning 
is coming from, after which, the context is no longer available:

g! start 21
[Gogo shell] DEBUG TestCoreServlet.context - BundleEvent STARTING - 
TestCoreServlet.context
[Gogo shell] DEBUG TestCoreServlet.context - BundleEvent STARTED - 
TestCoreServlet.context
[Gogo shell] DEBUG TestCoreServlet.context - ServiceEvent REGISTERED - 
[org.osgi.service.http.context.ServletContextHelper] - 
TestCoreServlet.context
[Gogo shell] DEBUG 
org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker - 
Service available [org.osgi.service.http.context.ServletContextHelper]
[Gogo shell] DEBUG org.ops4j.pax.web.service.internal.HttpServiceProxy - 
Unregistering servlet [TestCore.Servlet.Example@66d3eec0]
[Gogo shell] WARN org.ops4j.pax.web.service.internal.HttpServiceStopped - 
Http service has already been stopped
[Gogo shell] WARN org.ops4j.pax.web.service.internal.HttpServiceStopped - 
Http service has already been stopped
[Gogo shell] DEBUG org.ops4j.pax.web.service.internal.HttpServiceProxy - 
Setting context paramters [{httpContext.shared=true, 
webapp.context=context}] for http context 
[org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@7cd8fcb5]
[Gogo shell] WARN org.ops4j.pax.web.service.internal.HttpServiceStopped - 
Http service has already been stopped
[Gogo shell] WARN org.ops4j.pax.web.service.internal.HttpServiceStopped - 
Http service has already been stopped




On Wednesday, March 15, 2017 at 10:06:07 AM UTC-4, Eben Stewart wrote:
>
> I'd certainly like get to know the Pax code base better , but right now 
> I'm not even sure where to look :D
>
> On Wednesday, March 15, 2017 at 3:30:36 AM UTC-4, Achim Nierbeck wrote:
>>
>> Thanks for the jira ... will see when I have some time, 
>> through we really love contributions ;) 
>>
>> regards, Achim 
>>
>>
>> 2017-03-15 1:19 GMT+01:00 Eben Stewart <[email protected]>:
>>
>>> https://ops4j1.jira.com/browse/PAXWEB-1077
>>>
>>>
>>> On Tuesday, March 14, 2017 at 8:10:16 PM UTC-4, Eben Stewart wrote:
>>>>
>>>> same thing - I'll open a Jira for it. 
>>>>
>>>> Makes development really challenging every time you make a change to 
>>>> have to restart the whole framework :D
>>>>
>>>>
>>>>
>>>> On Tuesday, March 14, 2017 at 6:53:00 PM UTC-4, Achim Nierbeck wrote:
>>>>>
>>>>> Hi, 
>>>>>
>>>>> in fact there is :-) 
>>>>> for a maven project it's
>>>>>
>>>>>         <!-- OPS4J SNAPSHOT repository -->
>>>>>         <repository>
>>>>>             <id>ops4j.sonatype.snapshots.deploy</id>
>>>>>             <name>OPS4J snapshot repository</name>
>>>>>             <url>
>>>>> https://oss.sonatype.org/content/repositories/ops4j-snapshots/</url>
>>>>>             <releases>
>>>>>                 <enabled>false</enabled>
>>>>>             </releases>
>>>>>             <snapshots>
>>>>>                 <enabled>true</enabled>
>>>>>             </snapshots>
>>>>>         </repository>
>>>>>
>>>>> regards, Achim 
>>>>>
>>>>> 2017-03-14 21:53 GMT+01:00 Eben Stewart <[email protected]>:
>>>>>
>>>>>> thanks :)
>>>>>>
>>>>>> tested and recreated with 6.0.3-SNAPSHOT bundles
>>>>>>
>>>>>> However, I am getting build error for pax-web-jetty-bundle (all other 
>>>>>> artifacts built fine from a fresh git clone), so I can't be sure if the 
>>>>>> 6.0.2 version of that is valid to test with.  Is there a compiled 
>>>>>> version 
>>>>>> of pax-web-jetty-bundle artifact available somewhere?
>>>>>>
>>>>>> I'll make sure to backtrack and do a fresh install of Karaf to get 
>>>>>> steps to recreate for Jira purposes
>>>>>>
>>>>>> On Tuesday, March 14, 2017 at 10:26:34 AM UTC-4, Achim Nierbeck wrote:
>>>>>>>
>>>>>>> You should have received an invitation for jira. 
>>>>>>> Welcome aboard. 
>>>>>>>
>>>>>>> regards, Achim 
>>>>>>>
>>>>>>>
>>>>>>> 2017-03-14 15:19 GMT+01:00 Eben Stewart <[email protected]>:
>>>>>>>
>>>>>>>> Will do.  Do I need to make a separate request for Jira access?
>>>>>>>>
>>>>>>>> --
>>>>>>>> --
>>>>>>>> ------------------
>>>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>>>
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "OPS4J" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>>
>>>>>>> Apache Member
>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> 
>>>>>>> Committer & Project Lead
>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>>>
>>>>>>> Software Architect / Project Manager / Scrum Master 
>>>>>>>
>>>>>>> -- 
>>>>>> -- 
>>>>>> ------------------
>>>>>> OPS4J - http://www.ops4j.org - [email protected]
>>>>>>
>>>>>> --- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "OPS4J" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>>
>>>>> Apache Member
>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> 
>>>>> Committer & Project Lead
>>>>> blog <http://notizblog.nierbeck.de/>
>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>
>>>>> Software Architect / Project Manager / Scrum Master 
>>>>>
>>>>> -- 
>>> -- 
>>> ------------------
>>> OPS4J - http://www.ops4j.org - [email protected]
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "OPS4J" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer 
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master 
>>
>>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to