Restful request failed in Spectrum after an upgrade

book

Article ID: 117363

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

After upgrading to Spectrum 10.3 seeing the following errors when trying to use REST query:


<ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat">
      <ns1:faultstring>
         java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.Utils
      </ns1:faultstring>
</ns1:XMLFault>

What can be done to fix this?

Cause

After upgrading to Spectrum 10.3 when using REST query such as:

http://xx.xx.xx.xx:8888/spectrum/restful/alarms

you may see the following error:

<ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat">
      <ns1:faultstring>
         java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.Utils
      </ns1:faultstring>
</ns1:XMLFault>

In Spectrum 10.3, the CXF version had been upgraded, which introduces some change in the REST response format. Due to these changes, it is not compatible with previous versions. 

Environment

Spectrum 10.x

Resolution

During upgrade there is a possibility that either a file hasn't been replaced or a file has been added without removing the old version.  See the list of CXF files under: 

$SPECROOT/RestfulExamples/lib 

Check the following files to see if they exist only once and in this version: 

jaxb-impl-2.2.11.jar 
cxf-core-3.2.4.jar

On your OneClick Server please check the following folder: 

$SPECROOT/tomcat/lib 

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 

In case of duplicates, please (re)move the old files. 

That listing above is the current up to date list of files. 

If you see duplicates or older files, delete then and that should resolve the issue.