Likely, yes. The issue is with the embedded jetty in that it disallows duplicate/multiple web fragments. The fix tells jetty to not look in other places and only rely on the CAS web.xml file.
From: [email protected] [mailto:[email protected]] On Behalf Of Jonathan Labin Sent: Wednesday, December 23, 2015 12:35 PM To: CAS Community <[email protected]> Cc: [email protected] Subject: Re: [cas-user] Errors adding ldap to overlay Worked thanks. Was this a known issue that was fixed since when I originally checked out the overlay? What fixed the issue? On Wednesday, December 23, 2015 at 12:13:58 PM UTC-5, Misagh Moayyed wrote: Pull from Jasig repo’s master again, and merge. Problem should go away. From: [email protected] <javascript:> [mailto:[email protected] <javascript:> ] On Behalf Of Jonathan Labin Sent: Wednesday, December 23, 2015 9:54 AM To: CAS Community <[email protected] <javascript:> > Subject: [cas-user] Errors adding ldap to overlay After successfully building the cas war with the defaults provided in the overlay template, I have been attempting to add LDAP support but have run into trouble. By following the instructions at: http://jasig.github.io/cas/4.1.x/installation/LDAP-Authentication.html I added the cas-server-support-ldap dependency to my overlay pom.xml file. The overlay build succeeds however running the web app with jetty (as described in the overlay template readme) now provides two errors: The first is: java.lang.IllegalStateException: Duplicate fragment name: spring_web for jar:file:///C:/dev/cas-overlay-template/target/tmp/cas-server-webapp-4_1_3_war1/WEB-INF/lib/spring-web-4.1.8.RELEASE.jar!/META-INF/web-fragment.xml and jar:file:///C:/Users/labin/.m2/repository/org/springframework/spring-web/4.1.8.RELEASE/spring-web-4.1.8.RELEASE.jar!/META-INF/web-fragment.xml at org.eclipse.jetty.webapp.MetaData.addFragment(MetaData.java:279) at org.eclipse.jetty.webapp.FragmentConfiguration.findWebFragments(FragmentConfiguration.java:75) at org.eclipse.jetty.webapp.FragmentConfiguration.preConfigure(FragmentConfiguration.java:42) at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:480) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:516) at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:398) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.maven.plugin.JettyRunForkedMojo.startJetty(JettyRunForkedMojo.java:291) at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:328) at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:170) at org.eclipse.jetty.maven.plugin.JettyRunForkedMojo.execute(JettyRunForkedMojo.java:225) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) The second error is: [STDERR] 2015-12-23 11:39:22.110:WARN:oejx.XmlParser:main: FATAL@null line:1 col:1 : org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. [STDERR] 2015-12-23 11:39:22.111:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.m.p.Jett...@17c1bced{/cas,[file:///C:/dev/cas-overlay-template/src/main/webapp/ <javascript:> , file:///C:/dev/cas-overlay-template/target/tmp/cas-server-webapp-4_1_3_war1/],null <file:///C:/dev/cas-overlay-template/target/tmp/cas-server-webapp-4_1_3_war1/%5d,null> } [STDERR] org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. [STDERR] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) [STDERR] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1437) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1019) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117) [STDERR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) [STDERR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) [STDERR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) [STDERR] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [STDERR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) [STDERR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649) [STDERR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333) [STDERR] at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:255) [STDERR] at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:54) [STDERR] at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:207) [STDERR] at org.eclipse.jetty.webapp.MetaData.setWebXml(MetaData.java:189) [STDERR] at org.eclipse.jetty.maven.plugin.MavenQuickStartConfiguration.preConfigure(MavenQuickStartConfiguration.java:71) [STDERR] at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:480) [STDERR] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:516) [STDERR] at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:398) [STDERR] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [STDERR] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [STDERR] at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) [STDERR] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [STDERR] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [STDERR] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [STDERR] at org.eclipse.jetty.server.Server.start(Server.java:405) [STDERR] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106) [STDERR] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [STDERR] at org.eclipse.jetty.server.Server.doStart(Server.java:372) [STDERR] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [STDERR] at org.eclipse.jetty.maven.plugin.Starter.run(Starter.java:370) [STDERR] at org.eclipse.jetty.maven.plugin.Starter.main(Starter.java:468) I have noticed that the fork-web.xml file generated when running jetty is 0 length now whereas before adding the ldap dependency this was not the case. -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <javascript:> . Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
