Run this and report back ... $ cd /path/to/mybase $ java -jar /path/to/jetty-dist/start.jar --list-config
Joakim Erdfelt / [email protected] On Wed, Sep 7, 2016 at 2:51 PM, John Jiang <[email protected]> wrote: > Hi, > BTW, I suffered from another problem when migrated my base to the new > built Jetty. > > My application setups a Basic Authentication, like the below, > web.xml > <login-config> > <auth-method>BASIC</auth-method> > <realm-name>Test Realm</realm-name> > </login-config> > <security-constraint> > <web-resource-collection> > <web-resource-name>Authentication</web-resource-name> > <url-pattern>/auth/*</url-pattern> > </web-resource-collection> > > <auth-constraint> > <role-name>admin</role-name> > <role-name>user</role-name> > <role-name>moderator</role-name> > </auth-constraint> > </security-constraint> > > mybase/etc/test-realm.xml > <?xml version="1.0"?> > <!DOCTYPE Configure PUBLIC "-" "http://www.eclipse.org/jetty/ > configure_9_3.dtd"> > <Configure id="Server" class="org.eclipse.jetty.server.Server"> > <!-- =========================================================== --> > <!-- Configure Authentication Login Service --> > <!-- Realms may be configured for the entire server here, or --> > <!-- they can be configured for a specific web app in a context --> > <!-- configuration (see $(jetty.home)/webapps/test.xml for an --> > <!-- example). --> > <!-- =========================================================== --> > <Call name="addBean"> > <Arg> > <New class="org.eclipse.jetty.security.HashLoginService"> > <Set name="name">Test Realm</Set> > <Set name="config"><Property name="jetty.base" > default="etc/realm.properties"/></Set> > <Set name="refreshInterval">0</Set> > </New> > </Arg> > </Call> > > <Get class="org.eclipse.jetty.util.log.Log" name="rootLogger"> > <Call name="warn"><Arg>demo test-realm is deployed. DO NOT USE IN > PRODUCTION!</Arg></Call> > </Get> > </Configure> > > But the server startup threw the following exception, > java.lang.IllegalStateException: No LoginService for > org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in > org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 > at org.eclipse.jetty.security.authentication.LoginAuthenticator. > setConfiguration(LoginAuthenticator.java:76) > at org.eclipse.jetty.security.SecurityHandler.doStart( > SecurityHandler.java:354) > at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart( > ConstraintSecurityHandler.java:448) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > at org.eclipse.jetty.server.session.SessionHandler. > doStart(SessionHandler.java:116) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > > Does Jetty make some change on this area? > Or I missed something on the migration? > > 2016-09-06 21:00 GMT+08:00 Simone Bordet <[email protected]>: > >> Hi, >> >> On Tue, Sep 6, 2016 at 2:24 PM, John Jiang <[email protected]> >> wrote: >> > Hi Simone, >> > >> > 2016-09-06 18:03 GMT+08:00 Simone Bordet <[email protected]>: >> >> >> >> Hi, >> >> >> >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet <[email protected]> >> >> wrote: >> >> > It was a bug, tracked here: >> >> > https://github.com/eclipse/jetty.project/issues/902 >> >> >> >> It's fixed, can you try the latest Jetty 9.3.x code and report back if >> >> it's working for you ? >> > >> > Clone all of the source codes and build it by myself? >> >> Yes, branch "jetty-9.3.x" and: >> >> mvn install -DskipTests=true >> >> for a quick build. >> >> -- >> Simone Bordet >> ---- >> http://cometd.org >> http://webtide.com >> Developer advice, training, services and support >> from the Jetty & CometD experts. >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
