Upgrading RS Gateway Extensions

This is an overview of common situations during RS Gateway extension upgrade due to upgraded Spring Boot versions in MATRIXX version 5280. For specific information about upgrade impacts to your extensions, see the third-party migration documentation.

If you have RS Gateway extensions, you must make code changes, recompile and re-test your extensions with MATRIXX version 5280. Extension libraries and classes are typically located in the following directories:
  • /opt/mtx/conf/webapps/rsgateway/classes
  • /opt/mtx/conf/webapps/rsgateway/lib
  • /opt/mtx/ext/rsgateway
  • /opt/mtx/ext/common

For information about Spring versions in MATRIXX, see the discussion about data changes in the MATRIXX Release Notes.

Third-Party Migration Documentation

In most extensions, code changes are needed because of API changes in the new versions of Spring Boot. Refer to the following additional third-party documentation for more information:
  • The discussion about preparing for 6.0 in the Spring Security documentation. Specifically refer to the servlet migration topics.
  • The Spring Boot 3.0 Migration Guide in GitHub.
  • The discussion about Spring Boot logging in the Spring Boot documentation.

Spring Security no longer includes WebSecurityConfigurerAdapter. The discussion about Spring Security without the WebSecurityConfigurerAdapter in the Spring blog describes common use cases and alternative configurations. Use that documentation as a guide for your updates.

Incompatible Packages and Versions

In some extensions, you might have to identify incompatible packages that were brought in because of third-party dependencies. For example, you might see a log4j error on start-up:
// error
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.logging.slf4j.Log4jLoggerFactory: method 'void <init>()' not found
In this situation, update the pom.xml file to exclude the dependency like this:
// pom.xml
  <dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-log4j2</artifactId>
     <exclusions>
       <exclusion>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j2-impl</artifactId>
       </exclusion>
     </exclusions>
  </dependency>
Non-Spring versions that were specified in your pom.xml file could bring in older and non-compatible versions of other dependencies. In this case, use the following Maven command to generate a dependency tree to determine how a dependency was brought in:
mvn -DoutputFile=tree.txt dependency:tree

After the dependency is identified, add the <exclusion> to exclude it.

You might have errors such as the following:
log4j:WARN No appenders could be found for logger (org.apache.htrace.core.Tracer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 
If the transitive dependencies are not logged, you can try to fix the issue temporarily by specifying the compatible versions of the logging dependencies in your pom.xml file. For example:
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
    <version>2.23.1</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.23.1</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>2.23.1</version>
</dependency>

Recompile and re-test your extensions.