Upgrading Tomcat?

92 views
Skip to first unread message

Michael Santangelo

unread,
Nov 26, 2022, 11:20:09 PM11/26/22
to CAS Community
Hello all,

Is there any way to upgrade the Tomcat version included with CAS independently of upgrading CAS itself?

We are currently running Tomcat 9.0.58 that appears to be bundled with CAS, and I'm trying to update to the latest 9 build (I think 0.69).  I have changed the line in the gradle.properties from 9.0.58 to 9.0.69 and then cleaned/built/--refresh-dependencies but nothing seems to make a difference.

Any advice would be appreciated.

-M

Pascal Rigaux

unread,
Nov 27, 2022, 3:52:10 AM11/27/22
to cas-...@apereo.org
Here is what I've done on an older CAS with maven. The exclude is added to maven-war-plugin configuration overlays. Doing it for gradle "war {" should be similar...

--- pom.xml
+++ pom.xml
@@ -59,6 +59,7 @@
<exclude>WEB-INF/lib/log4j-web-2.12.1.jar</exclude>
<exclude>WEB-INF/lib/log4j-jcl-2.12.1.jar</exclude>
<exclude>WEB-INF/lib/log4j-slf4j-impl-2.12.1.jar</exclude>
+ <exclude>WEB-INF/lib/tomcat-*-8.5.45.jar</exclude>
</excludes>
</overlay>
</overlays>
@@ -312,6 +313,17 @@
<version>2.3.2</version>
</dependency>

+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-jasper</artifactId>
+ <version>8.5.75</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina-ha</artifactId>
+ <version>8.5.75</version>
+ </dependency>
+
</dependencies>
</profile>


Michael Santangelo

unread,
Nov 29, 2022, 3:54:44 PM11/29/22
to CAS Community, pascal...@univ-paris1.fr
I'm not sure I follow where to edit these files in our specific instance.  I've got a cas-overlay-template version 6.5.0-SNAPSHOT, which I'm running via ./gradlew clean copyCasConfiguration build run and no matter which config files I edit I cannot get a new version of Tomcat to run.  I don't see where I can add these old tomcat jar files to the exclude list, nor where I'd include the new jar files.

It may just be easier to install a new version of CAS but I am admittedly nervous to do so.

Ray Bon

unread,
Nov 29, 2022, 5:49:04 PM11/29/22
to cas-...@apereo.org, pascal...@univ-paris1.fr
Michael,

The 6.5 (6.5.9) of the overlay includes your desired tomcat version.
Updating from SNAPSHOT to 9 'should not' cause problems. But check start up logs to see if any config properties changed name.
When I do upgrades, I compare the target project to my current project and manually (sigh) copy in the differences.

Ray

On Tue, 2022-11-29 at 12:50 -0800, Michael Santangelo wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Michael Santangelo

unread,
Nov 29, 2022, 11:14:16 PM11/29/22
to CAS Community, Ray Bon, pascal...@univ-paris1.fr
Yep I grabbed the 6.6.3 overlay-template and it ran using my old config (it is yelling about some of my service definitions, but I can fix those later since they're not deprecated yet). Thanks all!
Reply all
Reply to author
Forward
0 new messages