Hi the answer is quite simple, if Pax-Web finds a jetty.xml at the
configured file location it uses that one opposed to the fragment. If you
don't want to use it you need to configure Pax-Web to not look for it.
After that you should be able to use your fragment.

Though why don't you use the already available jetty.xml?

Regards Achim

sent from mobile device
Am 12.02.2013 15:05 schrieb "siv vasan" <svasanta....@gmail.com>:

> Hi,
> I am using Karaf 2.3.0.
>
> I am creating a fragment bundle for adding JAAS login service to jetty. But
> looks like it is not considered and I am netting login service not foud
> exception. If add same to the etc/jetty.xml then it works fine.  What could
> be the issue ?
>
> 'Fragment-Host': org.ops4j.pax.web.pax-web-jetty-bundle
>
> jetty.xml fragment:
> <Configure id="Server" class="org.eclipse.jetty.server.Server">
>
>         <Call name="addBean">
>       <Arg>
>         <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
>                   <Set name="name">LDAP</Set>
>           <Set name="loginModuleName">LDAP</Set>
>                   <Set name="roleClassNames">
>                         <Array type="java.lang.String">
>
> <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal</Item>
>                         </Array>
>                   </Set>
>         </New>
>       </Arg>
>     </Call>
> </Configure>
>
> Exception:
> java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.FormAuthenticator@1f08b14 in
> org.eclipse.jetty.security.ConstraintSecurityHandler@a00a4b
>         at
>
> org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:45)[65:org.eclipse.jetty.security:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.security.authentication.FormAuthenticator.setConfiguration(FormAuthenticator.java:129)[65:org.eclipse.jetty.security:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:376)[65:org.eclipse.jetty.security:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:233)[65:org.eclipse.jetty.security:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[58:org.eclipse.jetty.util:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)[64:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)[64:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:120)[64:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
>
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[58:org.eclipse.jetty.util:7.6.7.v20120910]
>
> Thanks
> -S vasanta
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Jetty-fragment-bundle-is-not-considered-by-pax-web-tp4027732.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Reply via email to