search cancel

REST API is no longer working after Spectrum upgrade

book

Article ID: 112760

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

After the upgrade to 10.3 (or any other newer release) you may experience the following issues:

  • Unable to enable the integration with CA UIM on the OneClick .- 
  • HTTP 500 - Internal Server Error occurred, please reload Webclient. using the WebClient . 

Failure on the following REST API:

http://<OneClick_hostname>:<port>/spectrum/restful/heartbeat 

An exception is seen in the OneClick Tomcat log: 

SEVERE: Servlet.service() for servlet [CXFServlet] in context with path [/spectrum] threw exception [Servlet execution threw an exception] with root cause  

java.lang.NoSuchFieldError: REFLECTION 

Cause

Legacy JAR files in the $SPECROOT/tomcat/lib/ directory are conflicting with the new ones.

Environment

CA Spectrum 10.3

Resolution

Check the following list of jar file versions in your Spectrum environment and confirm all the jars are updated with latest version and make sure no old version exist:

jaxb-impl-2.2.11.jar 

cxf-core-3.2.4.jar 

cxf-rt-frontend-jaxrs-3.2.4.jar 

cxf-rt-rs-extension-providers-3.2.4.jar 

cxf-rt-transports-http-3.2.4.jar 

cxf-tools-common-3.2.4.jar 

cxf-rt-rs-client-3.2.4.jar 

woodstox-core-5.0.3.jar 

stax2-api-3.1.4.jar


If any old version exists, please delete and try to perform the rest API queries. 

These files are located in the following directories: 

$SPECROOT/tomcat/lib 

$SPECROOT/RestfulExamples/lib 

If older versions are found, then do the following:

  1. Stop the Spectrum Tomcat service

  2. Remove any jar files found to be in version conflict so only the most recent jar exists

  3. Start the Spectrum Tomcat service
     

Additional Information

A brief explanation about the java error: 

java.lang.NoSuchFieldError: REFLECTION 
---------------------------------------> 
public class NoSuchFieldError 
extends IncompatibleClassChangeError 

Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field. 

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. 
<--------------------------------------- 

This indicates there is a version mismatch conflict. In 10.3 release, we have upgraded CXF version and which will have some change in rest response format, so in the spectrum code we have handled the response format change while parsing. Thus post Upgrade to 10.3 it is possible some of the above mentions jars may be in version conflict and prevent RESTful API from working. 

Another possible related issue is described in the following KB:

KB : Unable to access REST API heartbeat in Spectrum 10.4.3