Jetty custom LoginService question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty custom LoginService question

mortac8

Can anyone point me to a working example of a custom LoginService for Jetty?

I am just trying to do something as simple as making a copy of HashLoginService in a package in my project then reference that class from jetty-web.xml. When I do so, I always get:

2017-05-23 21:16:36.511:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@60c6f5b{/,file:///D:/jetty-distribution-9.4.2.v2
0170220/webapps/a5-1.0-SNAPSHOT/,UNAVAILABLE}{D:\jetty-distribution-9.4.2.v20170220\webapps\a5-1.0-SNAPSHOT}
java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenticator(class org.eclipse.jetty.security.authenti
cation.FormAuthenticator)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:593)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:675)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:420)

OR

java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecu
rityHandler.setLoginService(class org.overlord.fta.login.MyLoginService)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlC
onfiguration.java:579)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur
e(XmlConfiguration.java:384)

Is this some classloader issue that I'm not understanding? Can anyone help me get a custom LoginService working? Thanks so much!

I have tried the code at the following github project which is similar to my project setup but that doesn't work either (same errors). https://github.com/EricWittmann/fuse-test-apps/tree/master/fta-custom-login-service-war

Below is my jetty-web.xml:

  <Get name="securityHandler">
    <Set name="loginService">
      <!-- THIS WORKS USING JETTY'S HASHLOGINSERVICE -->
      <New class="org.eclipse.jetty.security.HashLoginService">
        <Set name="name">testrealm</Set>
        <Set name="config">
        <SystemProperty name="jetty.base"
                        default="." />/etc/realm.properties</Set>
      </New>   
      <!-- THIS WON'T WORK USING MY HASHLOGINSERVICE -->   
      <!--New class="com.mysite.HashLoginService">
        <Set name="name">testrealm</Set>
        <Set name="config">
        <SystemProperty name="jetty.base"
                        default="." />/etc/realm.properties</Set>
      </New-->
  </Get>

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Jetty custom LoginService question

Greg Wilkins
What jetty version? those line numbers don't match 9.4 or 9.2 releases?
More of the output would also be handy.

However, looking at it, I think the XmlConfiguration has been able to load your Login Service OK, except that it is not being seen as an instance of LoginService and thus a setter method cannot be found for it.

Your class needs to be on the container classpath and not in your webapp.  If you really want to have it in your webapp, you need to make sure that you setup system/server classes so that the Jetty classes used by it are exposed to the webapp and cannot be overwritten by the webapp.    Perhaps try setting setParentLoaderPriority(true) on the context.... but I'd recommend at least getting it to work on the container classpath before trying anything like that.

regards



On 24 May 2017 at 04:25, Ashley Mort <[hidden email]> wrote:

Can anyone point me to a working example of a custom LoginService for Jetty?

I am just trying to do something as simple as making a copy of HashLoginService in a package in my project then reference that class from jetty-web.xml. When I do so, I always get:

2017-05-23 21:16:36.511:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@60c6f5b{/,file:///D:/jetty-distribution-9.4.2.v2
0170220/webapps/a5-1.0-SNAPSHOT/,UNAVAILABLE}{D:\jetty-distribution-9.4.2.v20170220\webapps\a5-1.0-SNAPSHOT}
java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenticator(class org.eclipse.jetty.security.authenti
cation.FormAuthenticator)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:593)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:675)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:420)

OR

java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecu
rityHandler.setLoginService(class org.overlord.fta.login.MyLoginService)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlC
onfiguration.java:579)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur
e(XmlConfiguration.java:384)

Is this some classloader issue that I'm not understanding? Can anyone help me get a custom LoginService working? Thanks so much!

I have tried the code at the following github project which is similar to my project setup but that doesn't work either (same errors). https://github.com/EricWittmann/fuse-test-apps/tree/master/fta-custom-login-service-war

Below is my jetty-web.xml:

  <Get name="securityHandler">
    <Set name="loginService">
      <!-- THIS WORKS USING JETTY'S HASHLOGINSERVICE -->
      <New class="org.eclipse.jetty.security.HashLoginService">
        <Set name="name">testrealm</Set>
        <Set name="config">
        <SystemProperty name="jetty.base"
                        default="." />/etc/realm.properties</Set>
      </New>   
      <!-- THIS WON'T WORK USING MY HASHLOGINSERVICE -->   
      <!--New class="com.mysite.HashLoginService">
        <Set name="name">testrealm</Set>
        <Set name="config">
        <SystemProperty name="jetty.base"
                        default="." />/etc/realm.properties</Set>
      </New-->
  </Get>

_______________________________________________
jetty-users mailing list
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Jetty custom LoginService question

mortac8
Thanks for your help!  Below is my full log.  I am using jetty-9.4.2 though I have tried 8.1.9 and 9.4.5 as well.  

I still get the same error no matter where I put my "MyLoginService".  It had been in my .war but per your suggestion I took it out of the war and built it into a standalone jar which I have tried putting in jetty.home/resources, or jetty.home/lib, or jetty.home/lib/ext, or using jetty-runner with the --lib flag.  

I still always get the same error:

D:\jetty-distribution-9.4.2.v20170220>java -jar start.jar
2017-05-24 09:41:37.022:INFO::main: Logging initialized @2503ms to org.eclipse.jetty.util.log.StdErrLog
2017-05-24 09:41:37.641:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not reco
mmended.  See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2017-05-24 09:41:37.798:INFO:oejs.Server:main: jetty-9.4.2.v20170220
2017-05-24 09:41:37.875:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///D:/jetty-distribution-9.4.2.v20170220/webapps/] at interval 1

2017-05-24 09:41:38.976:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=468ms
Setting MyLoginService name to: testrealm
2017-05-24 09:41:39.050:WARN:oejx.XmlConfiguration:main: Config error at <Set name="authenticator">|      <New class="org.eclipse.jetty.security.authe
ntication.FormAuthenticator"><Set name="alwaysSaveUri">true</Set></New>|    </Set> java.lang.NoSuchMethodException: class org.eclipse.jetty.security.C
onstraintSecurityHandler.setAuthenticator(class org.eclipse.jetty.security.authentication.FormAuthenticator) in file:/D:/jetty-distribution-9.4.2.v201
70220/webapps/a5-1.0-SNAPSHOT/WEB-INF/jetty-web.xml
2017-05-24 09:41:39.056:WARN:oejx.XmlConfiguration:main: Config error at <Get name="securityHandler"><Set name="loginService">|     |     <New class="
com.mort.login.MyLoginService"><Set name="name">testrealm</Set><Set name="config">|        <SystemProperty name="jetty.home" default="."/>/etc/realm.p
roperties</Set></New>|   </Set><Set name="authenticator">|      <New class="org.eclipse.jetty.security.authentication.FormAuthenticator"><Set name="al
waysSaveUri">true</Set></New>|    </Set></Get> java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenti
cator(class org.eclipse.jetty.security.authentication.FormAuthenticator) in file:/D:/jetty-distribution-9.4.2.v20170220/webapps/a5-1.0-SNAPSHOT/WEB-IN
F/jetty-web.xml
2017-05-24 09:41:39.064:WARN:oejw.JettyWebXmlConfiguration:main: Error applying file:///D:/jetty-distribution-9.4.2.v20170220/webapps/a5-1.0-SNAPSHOT/
WEB-INF/jetty-web.xml
2017-05-24 09:41:39.068:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@cb644e{/,file:///D:/jetty-distribution-9.4.2.v20
170220/webapps/a5-1.0-SNAPSHOT/,UNAVAILABLE}{D:\jetty-distribution-9.4.2.v20170220\webapps\a5-1.0-SNAPSHOT}
java.lang.NoSuchMethodException: class org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenticator(class org.eclipse.jetty.security.authenti
cation.FormAuthenticator)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:593)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:675)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:420)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:300)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:245)
        at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.lambda$configure$0(JettyWebXmlConfiguration.java:93)
        at org.eclipse.jetty.webapp.WebAppClassLoader.runWithServerClassAccess(WebAppClassLoader.java:159)
        at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:93)
        at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:512)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1437)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:437)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
        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.server.Server.start(Server.java:452)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:419)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1511)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1438)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1437)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:222)
        at org.eclipse.jetty.start.Main.start(Main.java:486)
        at org.eclipse.jetty.start.Main.main(Main.java:79)
2017-05-24 09:41:39.159:INFO:oejs.AbstractConnector:main: Started ServerConnector@4b53f538{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2017-05-24 09:41:39.161:INFO:oejs.Server:main: Started @4643ms
Reply | Threaded
Open this post in threaded view
|

Re: Jetty custom LoginService question

Jan Bartel
Make a new jetty base directory for this. Put your webapp into it. Enable modules such as http,  security, deploy, and ext and any others you might need   (take a look at $jetty.home/demo-base/ to get some ideas).  Put your jar with the LoginService impl into your jetty base lib/ext directory.  Then, take the lines from your WEB-INF/jetty-web.xml file that sets up the login service and put them into a context xml file for your webapp so they are read first, rather than last as is the case with jetty-web.xml when configuring your webapp. 

Finally, if its still not working, open an issue and attach a small reproduction test case and we'll take a close look.

cheers
Jan

On 24 May 2017 at 16:51, mortac8 <[hidden email]> wrote:
Thanks for your help!  Below is my full log.  I am using jetty-9.4.2 though I
have tried 8.1.9 and 9.4.5 as well.

I still get the same error no matter where I put my "MyLoginService".  It
had been in my .war but per your suggestion I took it out of the war and
built it into a standalone jar which I have tried putting in
jetty.home/resources, or jetty.home/lib, or jetty.home/lib/ext, or using
jetty-runner with the --lib flag.

I still always get the same error:

D:\jetty-distribution-9.4.2.v20170220>java -jar start.jar
2017-05-24 09:41:37.022:INFO::main: Logging initialized @2503ms to
org.eclipse.jetty.util.log.StdErrLog
2017-05-24 09:41:37.641:WARN:oejs.HomeBaseWarning:main: This instance of
Jetty is not running from a separate {jetty.base} directory, this is not
reco
mmended.  See documentation at
http://www.eclipse.org/jetty/documentation/current/startup.html
2017-05-24 09:41:37.798:INFO:oejs.Server:main: jetty-9.4.2.v20170220
2017-05-24 09:41:37.875:INFO:oejdp.ScanningAppProvider:main: Deployment
monitor [file:///D:/jetty-distribution-9.4.2.v20170220/webapps/] at interval
1

2017-05-24 09:41:38.976:INFO:oeja.AnnotationConfiguration:main: Scanning
elapsed time=468ms
Setting MyLoginService name to: testrealm
2017-05-24 09:41:39.050:WARN:oejx.XmlConfiguration:main: Config error at
<Set name="authenticator">|      <New
class="org.eclipse.jetty.security.authe
ntication.FormAuthenticator"><Set name="alwaysSaveUri">true</Set></New>|
</Set> java.lang.NoSuchMethodException: class org.eclipse.jetty.security.C
onstraintSecurityHandler.setAuthenticator(class
org.eclipse.jetty.security.authentication.FormAuthenticator) in
file:/D:/jetty-distribution-9.4.2.v201
70220/webapps/a5-1.0-SNAPSHOT/WEB-INF/jetty-web.xml
2017-05-24 09:41:39.056:WARN:oejx.XmlConfiguration:main: Config error at
<Get name="securityHandler"><Set name="loginService">|     |     <New
class="
com.mort.login.MyLoginService"><Set name="name">testrealm</Set><Set
name="config">|        <SystemProperty name="jetty.home"
default="."/>/etc/realm.p
roperties</Set></New>|   </Set><Set name="authenticator">|      <New
class="org.eclipse.jetty.security.authentication.FormAuthenticator"><Set
name="al
waysSaveUri">true</Set></New>|    </Set></Get>
java.lang.NoSuchMethodException: class
org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenti
cator(class org.eclipse.jetty.security.authentication.FormAuthenticator) in
file:/D:/jetty-distribution-9.4.2.v20170220/webapps/a5-1.0-SNAPSHOT/WEB-IN
F/jetty-web.xml
2017-05-24 09:41:39.064:WARN:oejw.JettyWebXmlConfiguration:main: Error
applying
file:///D:/jetty-distribution-9.4.2.v20170220/webapps/a5-1.0-SNAPSHOT/
WEB-INF/jetty-web.xml
2017-05-24 09:41:39.068:WARN:oejw.WebAppContext:main: Failed startup of
context
o.e.j.w.WebAppContext@cb644e{/,file:///D:/jetty-distribution-9.4.2.v20
170220/webapps/a5-1.0-SNAPSHOT/,UNAVAILABLE}{D:\jetty-distribution-9.4.2.v20170220\webapps\a5-1.0-SNAPSHOT}
java.lang.NoSuchMethodException: class
org.eclipse.jetty.security.ConstraintSecurityHandler.setAuthenticator(class
org.eclipse.jetty.security.authenti
cation.FormAuthenticator)
        at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:593)
        at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
        at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:675)
        at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:420)
        at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:300)
        at
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:245)
        at
org.eclipse.jetty.webapp.JettyWebXmlConfiguration.lambda$configure$0(JettyWebXmlConfiguration.java:93)
        at
org.eclipse.jetty.webapp.WebAppClassLoader.runWithServerClassAccess(WebAppClassLoader.java:159)
        at
org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:93)
        at
org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:512)
        at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1437)
        at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
        at
org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
        at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at
org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
        at
org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
        at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
        at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
        at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
        at
org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:437)
        at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
        at
org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at
org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
        at
org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
        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.server.Server.start(Server.java:452)
        at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
        at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:419)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1511)
        at
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1438)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1437)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:222)
        at org.eclipse.jetty.start.Main.start(Main.java:486)
        at org.eclipse.jetty.start.Main.main(Main.java:79)
2017-05-24 09:41:39.159:INFO:oejs.AbstractConnector:main: Started
ServerConnector@4b53f538{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2017-05-24 09:41:39.161:INFO:oejs.Server:main: Started @4643ms



--
View this message in context: http://jetty.4.x6.nabble.com/Jetty-custom-LoginService-question-tp4966621p4966623.html
Sent from the Jetty User mailing list archive at Nabble.com.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Jetty custom LoginService question

mortac8
In reply to this post by Greg Wilkins
Ok, I got it working by putting my custom LoginService in a .jar file that lives in lib/ext.  This didn't work initially for me initially but I tried it again and it worked.  Maybe I got package names confused in jetty-web.xml after I moved my class.

Next I will try the setParentLoaderPriority(true) in jetty-web.xml but the way I have it now with the jar in lib/ext works for me.  

Thanks so much for all the advice!