Error java.lang.NoSuchMethodError after upgrading a SPS
search cancel

Error java.lang.NoSuchMethodError after upgrading a SPS


Article ID: 277659


Updated On:




After upgrading a CA Access Gateway to 12.8.8 GA the following errors are reported on startup in the tomcat log (nohup.out)

Jan 03, 2024 12:56:27 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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                                                                                               .
Jan 03, 2024 12:56:28 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Servlet.init() for servlet [saml2nidws] threw exception
java.lang.NoSuchMethodError: 'java.util.Map'
        at org.glassfish.jersey.server.ApplicationHandler.initialize(
        at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(
        at org.glassfish.jersey.internal.Errors.process(
        at org.glassfish.jersey.internal.Errors.process(

In the use case where this issue has been detected this was not invalidating functionality of the CA Access Gateway, but nonetheless, depending on the missing method this may be causing issues

Also the present error has been described for Servlet saml2nidws, but it could be any other loaded by Tomcat


CA Access Gateway upgraded from a previous version


When Tomcat starts, it loads all the jar files present in the



If there are different jar files implementing the same class (in this case and jsr311-api-1.1.1.jar) but one of them contains the class showing problems without the method implemented, and these one is loaded last, when Tomcat tries to use it for Servlet init it will return the error shown


It is never an easy task to determine which class is loaded and which jar file implements a given class and method. However, it is possible to start Tomcat in verbose mode to show what is being loaded at each point.

To do this modify to include the following


Then observer the nohup.out at startup to see how jar files and their classes are loaded

For instance you would see something like the following

[26.792s][info][class,load  ] source: file:<SPS_HOME>/Tomcat/webapps/CA_AuthAZ/WEB-INF/lib/

[36.247s][info][class,load  ] source: file:<SPS_HOME>/Tomcat/webapps/affwebservices/WEB-INF/lib/jsr311-api-1.1.1.jar

which is telling you that the class is being loaded from jsr311-api-1.1.1.jar and thus possibly it is the method in this library which is failing

In these cases you may want to rename the lastes jar file loaded, in this case jsr311-api-1.1.1.jar so that the only one loaded at initialization time is the one implementing the desired method


Additional Information

While this description provides an explanation for this type of errors, this should be a rare occurrence and many times it may come from customization (leaving over classes specifically tailored for a certain system while it is being upgraded) or events like upgrade from a beta to a GA version or similar situations. The purpose of this article is to provide a plausible explanation for these errors and also to provide a possible way to troubleshoot them.