Spectrum REST API fails with java.lang.NoSuchMethodError after upgrade
search cancel

Spectrum REST API fails with java.lang.NoSuchMethodError after upgrade

book

Article ID: 442199

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

After upgrading DX NetOps Spectrum (e.g., from 23.3.13 to 25.4.4), the REST API fails to return data for specific endpoints, such as /spectrum/restful/models. Other endpoints like /landscapes may continue to work correctly.

Errors observed in the $SPECROOT/tomcat/logs/catalina.out or through curl output include: java.lang.NoSuchMethodError: 'void com.aprisma.spectrum.app.web.list.DomainModelList.<init>(int)'

Environment

DX NetOps Spectrum: Any version

Cause

This issue occurs because outdated JAR files from the previous version remain in the Tomcat library directories. When the Spectrum Tomcat service starts, it may load these older classes instead of the updated ones included in the new release. Because the method signatures have changed in the newer version, the Java Virtual Machine (JVM) throws a NoSuchMethodError when it cannot find the expected method in the loaded class.

Resolution

To resolve the conflict, move the legacy JAR files out of the Spectrum installation path and restart the Tomcat service.

1. Identify and Move Files

Move the legacy files from their respective directories to a backup location outside of the $SPECROOT directory:

From $SPECROOT/tomcat/lib:

From $SPECROOT/tomcat/webapps/spectrum/lib:

 

2. Restart the Spectrum Tomcat Service

Run the following commands as the Spectrum Install Owner:

bash
# Stop the Tomcat service
$SPECROOT/bin/stopTomcat.sh

# Ensure the process has completely stopped
ps -ef | grep tomcat | grep -v webtomcat

# Start the Tomcat service
$SPECROOT/bin/startTomcat.sh

 

Verification

Once Tomcat has restarted, verify the REST API functionality by running a GET or POST request to the affected endpoint: http://<OneClick_Server>:8080/spectrum/restful/models