Hi Oli,

sorry I'm quite busy lately.
One thing that doesn't look right though is the DefaultServlet, we're not
using it at Pax-Web, cause we have different one.
It might be related.

regards, Achim



2013/9/5 Oliver Wulff <[email protected]>

>  Do you have an idea what the issue might be?
>
> Thanks
> Oli
>
>
>   ------------------------------
> *From:* Oliver Wulff [[email protected]]
> *Sent:* 01 September 2013 23:07
> *To:* [email protected]
> *Subject:* RE: Configure authenticator for jetty in karaf
>
>   Hi Achim
>
> I had some time to look into this issue again. I've deployed my WAR which
> has got the following web.xml definition (it works fine within a jetty
> container):
> ...
>     <login-config>
>         <auth-method>WSFED</auth-method>
>         <realm-name>WSFED</realm-name>
>     </login-config>
>
> and the configuration of jetty.xml:
> ...
> <Get name="handler">
>  <Call name="addHandler">
>   <Arg>
>    <New class="org.eclipse.jetty.servlet.ServletContextHandler">
>     <Set name="contextPath">/fedizhelloworld</Set>
>     <Call name="addServlet">
>      <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
>      <Arg>/</Arg>
>     </Call>
>     <Set name="loginService">
>       <New class="org.apache.cxf.fediz.jetty.FederationLoginService">
>           <Set name="name">WSFED</Set>
>         </New>
>     </Set>
>     <Set name="authenticator">
>       <New class="org.apache.cxf.fediz.jetty.FederationAuthenticator">
>         <Set name="configFile"><SystemProperty name="jetty.home"
> default="."/>/etc/fediz_config.xml</Set>
>       </New>
>     </Set>
>    </New>
>   </Arg>
>  </Call>
> </Get>
>
> The bundles for fediz-core and fediz-jetty are deployed as well:
> [ 260] [Active     ] [            ] [       ] [   80] Apache Fediz Plugin
> Core (1.1.0.SNAPSHOT)
> [ 261] [Active     ] [            ] [       ] [   80] Apache Fediz Plugin
> Jetty (1.1.0.SNAPSHOT)
>
> But when I deploy the WAR into the deploy folder, I get the following
> exception:
>
> 22:54:42,796 | WARN  | Executor: 3      |
> util.component.AbstractLifeCycle  204 | 58 - org.eclipse.jetty.util -
> 7.6.8.v20121106 | FAILED
> org.eclipse.jetty.security.ConstraintSecurityHandler@3db60ec4:
> java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.BasicAuthenticator@7f664b8a in
> org.eclipse.jetty.security.ConstraintSecurityHandler@3db60ec4
> java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.BasicAuthenticator@7f664b8a in
> org.eclipse.jetty.security.ConstraintSecurityHandler@3db60ec4
>     at
> org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:44)[65:org.eclipse.jetty.security:7.6.8.v20121106]
>     at
> org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:376)[65:org.eclipse.jetty.security:7.6.8.v20121106]
>     at
> org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:233)[65:org.eclipse.jetty.security:7.6.8.v20121106]
>     at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[58:org.eclipse.jetty.util:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:120)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[58:org.eclipse.jetty.util:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:729)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:238)[66:org.eclipse.jetty.servlet:7.6.8.v20121106]
>     at
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:683)[64:org.eclipse.jetty.server:7.6.8.v20121106]
>     at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:100)[76:org.ops4j.pax.web.pax-web-jetty:1.1.12]
>     at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[58:org.eclipse.jetty.util:7.6.8.v20121106]
>     at
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:165)[76:org.ops4j.pax.web.pax-web-jetty:1.1.12]
>     at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:758)[75:org.ops4j.pax.web.pax-web-runtime:1.1.12]
>     at
> org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:281)[75:org.ops4j.pax.web.pax-web-runtime:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:348)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:629)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(ReplaceableService.java:114)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(ReplaceableService.java:28)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.serviceAdded(ReplaceableService.java:183)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingService(ServiceCollection.java:181)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf.jar:2.3.1]
>     at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)[karaf.jar:2.3.1]
>     at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf.jar:2.3.1]
>     at
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf.jar:2.3.1]
>     at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)[karaf.jar:2.3.1]
>     at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[karaf.jar:2.3.1]
>     at
> org.ops4j.pax.swissbox.tracker.ServiceCollection.onStart(ServiceCollection.java:139)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.onStart(ReplaceableService.java:146)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:81)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebXmlObserver.deploy(WebXmlObserver.java:204)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(WebXmlObserver.java:162)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>     at
> org.ops4j.pax.swissbox.extender.BundleWatcher$3.run(BundleWatcher.java:224)[218:org.ops4j.pax.web.pax-web-extender-war:1.1.12]
>
> ...
>
> 22:54:42,802 | DEBUG | tenerExecutor: 2 |
> ?                                   ? | 75 -
> org.ops4j.pax.web.pax-web-runtime - 1.1.12 | org/osgi/service/web/UNDEPLOYED
> 22:54:42,803 | ERROR | Executor: 3      |
> nder.war.internal.WebXmlObserver  171 | 218 -
> org.ops4j.pax.web.pax-web-extender-war - 1.1.12 | Could not parse web.xml
> java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.BasicAuthenticator@7f664b8a in
> org.eclipse.jetty.security.ConstraintSecurityHandler@3db60ec4
>     at
> org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:44)[65:org.eclipse.jetty.security:7.6.8.v20121106]
>     at
> org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:376)[65:org.eclipse.jetty.security:7.6.8.v20121106]
>
>
>  I'd appreciate a hint.
>
>
>  Thanks
>
> Oli
>
>
>  ------
>
> Oliver Wulff
>
> Blog: http://owulff.blogspot.com
> Solution Architect
> http://coders.talend.com
>
> <http://coders.talend.com>Talend Application Integration Division
> http://www.talend.com
>   ------------------------------
> *From:* Achim Nierbeck [[email protected]]
> *Sent:* 27 January 2013 21:21
> *To:* [email protected]
> *Subject:* Re: Configure authenticator for jetty in karaf
>
>   Hi Oliver,
>
>  I'm not sure I follow. The servlet context / Web-ApplicationContext
> configured in the Manifest is not connected to the jetty.xml. Those are
> different things. With the jetty.xml you are able to do a finer grained
> configuration compared to the configuration available through the
> config-admin service.
> So for example if you need to add another ServletContext Handler you need
> to "get" the list of Handlers from the jetty server first, the sample of my
> blog post is just about adding a DefaultServlet publishing static content.
>
>  regards, Achim
>
>
> 2013/1/27 Oliver Wulff <[email protected]>
>
>>  Hi Achim
>>
>> What about the reference to the resource:
>> <Set name="resourceBase">/path/to/your/share</Set>
>>
>> Is this really required in karaf? I've configured the servlet context in
>> the manifest file thus the link between karaf jetty.xml and the war bundle
>> could be created.
>>
>> Thanks
>> Oli
>>
>>
>>   ------------------------------
>> *From:* Achim Nierbeck [[email protected]]
>> *Sent:* 26 January 2013 18:32
>>
>> *To:* [email protected]
>> *Subject:* Re: Configure authenticator for jetty in karaf
>>
>>    Hi, I already wrote a little blog about it.
>> You can find it at [1]
>>
>> Regards, Achim
>>
>> [1] -
>> http://notizblog.nierbeck.de/2011/05/adding-additional-servletcontext-in-pax-web/
>>
>> sent from mobile device
>> Am 26.01.2013 03:31 schrieb "Jean-Baptiste Onofré" <[email protected]>:
>>
>>> Hi Oli,
>>>
>>> In fact, in etc/org.ops4j.pax.web.cfg, you can reference a etc/jetty.xml.
>>>
>>> In this jetty.xml, you can define your different connectors, and in your
>>> webapp (WAB) you can define which connector you want to use.
>>>
>>> I gonna blog about that (it's on my TODO ;)).
>>>
>>> Regards
>>> JB
>>>
>>> On 01/25/2013 10:28 PM, Oliver Wulff wrote:
>>>
>>>> Hi JB
>>>>
>>>> I could configure something like this in jetty.xml I assume:
>>>>
>>>> <Configure class="org.eclipse.jetty.**webapp.WebAppContext">
>>>>    <Set name="contextPath">/**fedizhelloworld</Set>
>>>>    <Get name="securityHandler">
>>>>      <Set name="loginService">
>>>>        <New class="org.apache.cxf.fediz.**
>>>> jetty.FederationLoginService">
>>>>            <Set name="name">WSFED</Set>
>>>>          </New>
>>>>      </Set>
>>>>      <Set name="authenticator">
>>>>        <New class="org.apache.cxf.fediz.**
>>>> jetty.FederationAuthenticator"**>
>>>>          <Set name="configFile"><**SystemProperty name="jetty.home"
>>>> default="."/>/etc/fediz_**config.xml</Set>
>>>>        </New>
>>>>      </Set>
>>>>      <Set name="checkWelcomeFiles">true<**/Set>
>>>>    </Get>
>>>> </Configure>
>>>>
>>>> But isn't it possible to configure the context related configs similar
>>>> to the native jetty distribution (<jetty-home>/contexts) without having to
>>>> update the core jetty.xml configuration?
>>>>
>>>> Thanks
>>>> Oli
>>>>
>>>>
>>>> ------
>>>>
>>>> Oliver Wulff
>>>>
>>>> Blog: http://owulff.blogspot.com
>>>> Solution Architect
>>>> http://coders.talend.com
>>>>
>>>> Talend Application Integration Division http://www.talend.com
>>>>
>>>> ______________________________**__________
>>>> From: Jean-Baptiste Onofré [[email protected]]
>>>> Sent: 26 November 2012 20:52
>>>> To: [email protected]
>>>> Subject: Re: Configure authenticator for jetty in karaf
>>>>
>>>> Hi Oli,
>>>>
>>>> when installing the http feature, you have access to etc/jetty.xml where
>>>> you can create your custom configuration.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 11/26/2012 08:48 PM, Oliver Wulff wrote:
>>>>
>>>>> Hi there
>>>>>
>>>>> I've built a custom authenticator for jetty thus web applications can
>>>>> also support WS-Federation SSO in Karaf for authentication. The
>>>>> snapshot
>>>>> version of the jetty module works but I'm wondering where I can
>>>>> configure the jetty authenticator, loginservice etc in Karaf.
>>>>>
>>>>> Thanks
>>>>> Oli
>>>>>
>>>>> ------
>>>>>
>>>>> Oliver Wulff
>>>>>
>>>>> Blog: http://owulff.blogspot.com <http://owulff.blogspot.com/>
>>>>> Solution Architect
>>>>> http://coders.talend.com
>>>>>
>>>>> <http://coders.talend.com>**Talend Application Integration Division
>>>>> http://www.talend.com
>>>>>
>>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> [email protected]
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [email protected]
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>
>
>  --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Reply via email to