Thank you Ray,

Out of curiosity, I tried removing the json-service registry dependency. 
After re-packaging, I have no duplicate libraries, however, when 
re-deploying, the tomcat service is still stuck after scanning for jars. 
Sounds like I have another issue with the server.

On Thursday, July 30, 2020 at 11:10:18 AM UTC-4 Ray Bon wrote:

> Jeremiah,
>
> To find the source(s) of old libraries, run 
> mvnw dependency:tree 
> You might want to send the out put to file. Then search for the old 
> libraries. You can exclude transitive dependencies with pom entries. If 
> there are a lot of duplicates, this will become tedious.
> I was not able to get 5.x cas-management installed. Working on 6.x now.
>
> Ray
>
> On Thu, 2020-07-30 at 07:32 -0700, Jeremiah Garmatter wrote:
>
> Notice: This message was sent from outside the University of Victoria 
> email system. Please be cautious with links and sensitive information. 
>
> Ray,
>
> It looks like Maven is grabbing all of them, after cleaning the target 
> directory within the cas-management-webapp-5.3 directory, I run "./mvnw 
> package" and all of the libraries are installed, duplicates included.
> I tried deleting the older versions of spring-web and log4j as those were 
> the two giving me errors (so far). After re-deploying on Tomcat, I check 
> the Catalina logs and it looks like Tomcat hangs trying to deploy the 
> management server. I am trying to deploy the management app on the same 
> machine as cas, if that changes anything.
>
> Catalina log:
> 30-Jul-2020 09:02:44.246 INFO [main] 
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache 
> Tomcat Native library [1.2.24] using APR version [1.6.5].
> 30-Jul-2020 09:02:44.246 INFO [main] 
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR 
> capabilities: IPv6 [true], sendfile [true], accept filters [false], random 
> [true].
> 30-Jul-2020 09:02:44.246 INFO [main] 
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL 
> configuration: useAprConnector [false], useOpenSSL [true]
> 30-Jul-2020 09:02:44.249 INFO [main] 
> org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL 
> successfully initialized [OpenSSL 1.1.1g  21 Apr 2020]
> 30-Jul-2020 09:02:44.381 INFO [main] 
> org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler 
> ["https-openssl-nio-8443"]
> 30-Jul-2020 09:02:44.561 INFO [main] 
> org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared 
> selector for servlet write/read
> 30-Jul-2020 09:02:44.577 INFO [main] 
> org.apache.catalina.startup.Catalina.load Initialization processed in 1090 
> ms
> 30-Jul-2020 09:02:44.635 INFO [main] 
> org.apache.catalina.core.StandardService.startInternal Starting service 
> [Catalina]
> 30-Jul-2020 09:02:44.636 INFO [main] 
> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet 
> Engine: Apache Tomcat/8.5.56
> 30-Jul-2020 09:02:44.663 INFO [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
> application directory [/var/lib/tomcat/ROOT]
> 30-Jul-2020 09:02:45.076 INFO [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web 
> application directory [/var/lib/tomcat/ROOT] has finished in [413] ms
> 30-Jul-2020 09:02:45.076 INFO [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
> application directory [/var/lib/tomcat/cas]
> 30-Jul-2020 09:02:57.103 INFO [localhost-startStop-1] 
> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned 
> for TLDs yet contained no TLDs. Enable debug logging for this logger for a 
> complete list of JARs that were scanned but no TLDs were found in them. 
> Skipping unneeded JARs during scanning can improve startup time and JSP 
> compilation time.
> 30-Jul-2020 09:03:45.082 INFO [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web 
> application directory [/var/lib/tomcat/cas] has finished in [60,006] ms
>
> *30-Jul-2020 09:03:45.082 INFO [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Deploying web 
> application directory [/var/lib/tomcat/cas-management] 30-Jul-2020 
> 09:03:54.118 INFO [localhost-startStop-1] 
> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned 
> for TLDs yet contained no TLDs. Enable debug logging for this logger for a 
> complete list of JARs that were scanned but no TLDs were found in them. 
> Skipping unneeded JARs during scanning can improve startup time and JSP 
> compilation time.*
>
>
> Here is my pom.xml for cas-management, I only added the dependency for 
> JSON and modified the version numbers from the file obtained from 
> https://github.com/apereo/cas-management-overlay/tree/5.3:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd ">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>org.apereo.cas</groupId>
>     <artifactId>cas-services-management-overlay</artifactId>
>     <packaging>war</packaging>
>     <version>1.0</version>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>com.rimerosolutions.maven.plugins</groupId>
>                   <artifactId>wrapper-maven-plugin</artifactId>
>                   <version>0.0.5</version>
>                   <configuration>
>                       <verifyDownload>true</verifyDownload>
>                     <checksumAlgorithm>MD5</checksumAlgorithm>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.springframework.boot</groupId>
>                 <artifactId>spring-boot-maven-plugin</artifactId>
>                 <version>${springboot.version}</version>
>                 <configuration>
>                     <mainClass>${mainClassName}</mainClass>
>                     <addResources>true</addResources>
>                     <executable>${isExecutable}</executable>
>                     <layout>WAR</layout>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>repackage</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-war-plugin</artifactId>
>                 <version>2.6</version>
>                 <configuration>
>                     <warName>cas-management</warName>
>                     <failOnMissingWebXml>false</failOnMissingWebXml>
>                     <recompressZippedFiles>false</recompressZippedFiles>
>                     <archive>
>                         <compress>false</compress>
>                         <manifestFile>${manifestFileToUse}</manifestFile>
>                     </archive>
>                     <overlays>
>                         <overlay>
>                             <groupId>org.apereo.cas</groupId>
>                             <artifactId>cas-management-webapp</artifactId>
>                         </overlay>
>                     </overlays>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.3</version>
>             </plugin>
>         </plugins>
>         <finalName>cas-management</finalName>
>     </build>
>
>     <dependencies>
>         <dependency>
>             <groupId>org.apereo.cas</groupId>
>             <artifactId>cas-management-webapp</artifactId>
>             <version>${cas-mgmt.version}</version>
>             <type>war</type>
>         </dependency>
>         <!-- Allow Management webapp to access the same json service 
> registry as cas-->
>         <dependency>
>             <groupId>org.apereo.cas</groupId>
>             
> <artifactId>cas-server-support-json-service-registry</artifactId>
>             <version>${cas.version}</version>
>         </dependency>
>     </dependencies>
>
>     <properties>
>         <cas-mgmt.version>5.3.6</cas-mgmt.version>     
>         <cas.version>5.3.6</cas.version>
>         <springboot.version>1.5.18.RELEASE</springboot.version>
>         
> <mainClassName>org.springframework.boot.loader.WarLauncher</mainClassName>
>         <isExecutable>false</isExecutable>
>         
> <manifestFileToUse>${project.build.directory}/war/work/org.apereo.cas/cas-management-webapp/META-INF/MANIFEST.MF</manifestFileToUse>
>
>         <maven.compiler.source>1.8</maven.compiler.source>
>         <maven.compiler.target>1.8</maven.compiler.target>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     </properties>
>
>     <repositories>
>         <repository>
>             <id>sonatype-releases</id>
>             <url>http://oss.sonatype.org/content/repositories/releases/
> </url>
>             <snapshots>
>                 <enabled>false</enabled>
>             </snapshots>
>             <releases>
>                 <enabled>true</enabled>
>             </releases>
>         </repository>
>         <repository>
>             <id>sonatype-snapshots</id>
>             <url>https://oss.sonatype.org/content/repositories/snapshots/
> </url>
>             <snapshots>
>                 <enabled>true</enabled>
>             </snapshots>
>             <releases>
>                 <enabled>false</enabled>
>             </releases>
>         </repository>
>         <repository>
>             <id>shibboleth-releases</id>
>             <url>
> https://build.shibboleth.net/nexus/content/repositories/releases</url>
>         </repository>
>     </repositories>
>
>     <profiles>
>         <profile>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>             </activation>
>             <id>exec</id>
>             <properties>
>                 
> <mainClassName>org.apereo.cas.mgmt.web.CasManagementWebApplication</mainClassName>
>                 <isExecutable>true</isExecutable>
>                 <manifestFileToUse></manifestFileToUse>
>             </properties>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>com.soebes.maven.plugins</groupId>
>                         <artifactId>echo-maven-plugin</artifactId>
>                         <version>0.3.0</version>
>                         <executions>
>                             <execution>
>                                 <phase>prepare-package</phase>
>                                 <goals>
>                                     <goal>echo</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                         <configuration>
>                             <echos>
>                             <echo>Executable profile to make the generated 
> CAS management application executable.</echo></echos>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>
>         <profile>
>             <activation>
>                 <activeByDefault>false</activeByDefault>
>             </activation>
>             <id>pgp</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>com.github.s4u.plugins</groupId>
>                         <artifactId>pgpverify-maven-plugin</artifactId>
>                         <version>1.1.0</version>
>                         <executions>
>                             <execution>
>                                 <goals>
>                                     <goal>check</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                         <configuration>
>                             <pgpKeyServer>hkp://pool.sks-keyservers.net
> </pgpKeyServer>
>                             
> <pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
>                             <scope>test</scope>
>                             <verifyPomFiles>true</verifyPomFiles>
>                             <failNoSignature>false</failNoSignature>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
> </project>
>
> On Thursday, July 30, 2020 at 10:08:12 AM UTC-4 Ray Bon wrote:
>
> Jeremiah,
>
> How are these multiple libraries getting in to the lib directory?
> You could just delete the duplicates, or wipe and rebuild.
>
> Ray
>
> On Thu, 2020-07-30 at 06:27 -0700, Jeremiah Garmatter wrote:
>
> Notice: This message was sent from outside the University of Victoria 
> email system. Please be cautious with links and sensitive information. 
>
>
> Follow-up:
>
> I've placed the absolute ordering tag within the ROOT application's 
> web.xml file and I was able to get past the spring_web web-fragment error. 
> However, once I did that, I received the same error for log4j, 
> note-for-note. After looking within cas-management/WEB-INF/lib, I found 
> dozens of repeated jar files. The same jar, but different versions. For 
> example, spring-web-4.3.17.RELEASE.jar and spring-web-4.3.20.RELEASE.jar. I 
> tried playing around with the versions maven uses to resolve dependencies 
> with cas-management-overlay-5.3/pom.xml without luck. Currently, I receive 
> the same error as posted yesterday with or without the <absolute-ordering/> 
> tag inside ROOT/WEB-INF/web.xml. I even tried making a web.xml for the 
> cas-management server in a misunderstood attempt at a solution.
>
> Has anyone seen this before?
>
> On Wednesday, July 29, 2020 at 4:15:01 PM UTC-4 Jeremiah Garmatter wrote:
>
>
> Hello,
>
> Recently, I've built a new(er) version of CAS for my university's SSO.
> I am utilizing CAS maven overlay to build CAS 5.3 deployed through tomcat. 
> I recently decided to add the management webapp (v5.3) and after adding it 
> to tomcat's webapps directory, I received this error:
>
> 29-Jul-2020 16:08:00.669 SEVERE [localhost-startStop-1] 
> org.apache.catalina.core.ContainerBase.addChildInternal 
> ContainerBase.addChild: start: 
>         org.apache.catalina.LifecycleException: Failed to start component 
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas-management]]
>                 at 
> org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
>                 at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
>                 at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
>                 at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
>                 at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
>                 at 
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
>                 at 
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1858)
>                 at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>                 at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>                 at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>                 at java.lang.Thread.run(Thread.java:748)
>         *Caused by: java.lang.IllegalArgumentException: More than one 
> fragment with the name [spring_web] was found. This is not legal with 
> relative ordering. See section 8.2.2 2c of the Servlet specification for 
> details. Consider using absolute ordering.*
>                 at 
> org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2203)
>                 at 
> org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2162)
>                 at 
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1131)
>                 at 
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:776)
>                 at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
>                 at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>                 at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5053)
>                 at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 ... 10 more
> 29-Jul-2020 16:08:00.669 SEVERE [localhost-startStop-1] 
> org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web 
> application directory [/var/lib/tomcat/cas-management]
>         java.lang.IllegalStateException: ContainerBase.addChild: start: 
> org.apache.catalina.LifecycleException: Failed to start component 
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas-management]]
>                 at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
>                 at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
>                 at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
>                 at 
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
>                 at 
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1858)
>                 at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>                 at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>                 at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>                 at java.lang.Thread.run(Thread.java:748)
>
> I looked up absolute ordering and placed <absolute-ordering/> into my 
> web.xml deployment right before the </web-app> line and still received 
> the error. I've tried cleaning Tomcat's work directory as well. I heard 
> that Tomcat may be using the cached data, but no luck there.
>
> Any ideas?
>
> -- 
>
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 <(250)%20721-8831> | CLE 019 | rb...@uvic.ca
>
> I respectfully acknowledge that my place of work is located within the 
> ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
> WSÁNEĆ Nations.
>
> -- 
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 <(250)%20721-8831> | CLE 019 | rb...@uvic.ca
>
> I respectfully acknowledge that my place of work is located within the 
> ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
> WSÁNEĆ Nations.
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/5fa4374c-2721-44a0-ac9a-1c2de53b0a0dn%40apereo.org.

Reply via email to