Hi Erwin,

afaik a custom Provider which implements the needed Interface HttpContext
should work well.

If you have trouble because of that, a sample for replay or better an
integration test for Pax-Web would be great :)

regards, Achim


2016-11-23 22:52 GMT+01:00 Dutch Dude <[email protected]>:

> BTW... no custom contextMapping.
>
> Erwin
>
>
> On Wednesday, November 23, 2016 at 4:51:07 PM UTC-5, Dutch Dude wrote:
>>
>> Hi Achim,
>>
>> Are you sure you registered it via an alias?
>> Yup:
>>
>> resourceProvider = new ResourceProvider();
>>
>> httpService.registerServlet("/portal", myServlet, null, resourceProvider);
>>
>>
>> I think I managed to get the container into a funky state with all my bundle 
>> updating. It looked like I had multiple copies of that servlet registered. 
>> For some reason the registration and the unregistration, although they had 
>> the same alias, referenced different objects.
>>
>>
>> I restarted everything and now things are more or less stable again (more or 
>> less because of my own activities...).
>>
>>
>> BTW... I DO use a custom resourceProvider as HttpContext. How would that 
>> influence the unregistration?
>>
>>
>>
>> Thanks for your prompt reply.
>>
>>
>> Erwin
>>
>>
>>
>>
>> Maybe you used a custom HttpContext with a custom ContextMapping.
>>> In case of a custom ContextMapping the Mapping would be portal, with an
>>> Alias of "/"
>>>
>>> regards, Achim
>>>
>>>
>>> 2016-11-23 15:49 GMT+01:00 Dutch Dude <[email protected]>:
>>>
>>>> Hi,
>>>>
>>>> I seem to have a problem with unregistering a servlet with Pax
>>>> Web-4.3.0. Although the servlet is there, I get an exception when I try to
>>>> unregister. See below.
>>>>
>>>> Am I missing something?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Erwin
>>>>
>>>> From karaf 'la'
>>>> 134 | MyServlet          | ServletModel-6             | Deployed    |
>>>> /portal                | [/portal/*]
>>>>
>>>> From bundle deactivate():
>>>>
>>>> httpService.unregister("/portal");
>>>>
>>>>
>>>> java.lang.IllegalArgumentException: Alias [/portal] was never
>>>> registered
>>>>         at org.ops4j.pax.web.service.internal.HttpServiceStarted.unregi
>>>> ster(HttpServiceStarted.java:278)
>>>>         at org.ops4j.pax.web.service.internal.HttpServiceProxy.unregist
>>>> er(HttpServiceProxy.java:77)
>>>>
>>>>
>>>> karaf@root>la | grep -i web
>>>>  62 | Active   |  30 | 1.1                          | WebSocket server
>>>> API
>>>>  67 | Active   |  30 | 4.0.7                        | Apache Karaf ::
>>>> Web Console :: Console
>>>>  68 | Active   |  30 | 4.0.7                        | Apache Karaf ::
>>>> Web Console :: Features Plugin
>>>>  69 | Active   |  30 | 4.0.7                        | Apache Karaf ::
>>>> Web Console :: Gogo Plugin
>>>>  70 | Active   |  30 | 4.0.7                        | Apache Karaf ::
>>>> Web Console :: HTTP Plugin
>>>>  71 | Active   |  30 | 4.0.7                        | Apache Karaf ::
>>>> Web Console :: Instance Plugin
>>>>  90 | Active   |  30 | 9.2.19.v20160908             | Jetty :: Webapp
>>>> Application Support
>>>>  91 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: API
>>>>  92 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: Client
>>>>  93 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: Common
>>>>  94 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: javax.websocket :: Client Implementation
>>>>  95 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: javax.websocket.server :: Server Implementation
>>>>  96 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: Server
>>>>  97 | Active   |  30 | 9.2.19.v20160908             | Jetty ::
>>>> Websocket :: Servlet Interface
>>>>  99 | Active   |  30 | 4.3.0                        | OPS4J Pax Web -
>>>> API
>>>> 100 | Active   |  30 | 4.3.0                        | OPS4J Pax Web -
>>>> Jetty
>>>> 101 | Active   |  30 | 4.3.0                        | OPS4J Pax Web -
>>>> Runtime
>>>> 102 | Active   |  30 | 4.3.0                        | OPS4J Pax Web -
>>>> Service SPI
>>>> 119 | Active   |  30 | 2.0.2                        | Apache Felix Web
>>>> Console Service Component Runtime/Declarative Services Plugin
>>>> 207 | Active   |  30 | 1.1.4                        | Apache Felix Web
>>>> Console Event Plugin
>>>>
>>>>
>>>> Mac OS X
>>>> java 8
>>>> Karaf 4.0.7
>>>>
>>>> --
>>>> --
>>>> ------------------
>>>> 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