The Spectrum Report Manager (SRM) scripts located in the $SPECROOT/Install-Tools/SRM-Tools directory fail to run in Spectrum 10.4.1.

book

Article ID: 192974

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

The Spectrum Report Manager (SRM) scripts located in the $SPECROOT/Install-Tools/SRM-Tools directory fail to run in Spectrum 10.4.1. The following error is seen when trying to run the poll_devices.sh, reconcile_reporting_db.sh and poll_landscape_for_events.sh scripts:

[[email protected] SRM-Tools]$ ./poll_device.sh -s spectrum -p 8080 -u spectrum -w spectrum -m 0x100006d
Polling device "0x100006d" using SRM server at  "spectrum:8080"
log4j:WARN No appenders could be found for logger (org.springframework.aop.framework.JdkDynamicAopProxy).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://spectrum:8080/spectrum/repmgr/remoting/PollingService]; nested exception is java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy0.pollDevice(Unknown Source)
        at com.aprisma.spectrum.app.repmgr.util.DevicePollingServicesClient.callService(DevicePollingServicesClient.java:92)
        at com.aprisma.spectrum.app.repmgr.util.DevicePollingServicesClient.main(DevicePollingServicesClient.java:64)
Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V
        at org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:65)
        at org.apache.http.impl.auth.BasicScheme.<init>(BasicScheme.java:84)
        at org.apache.http.impl.auth.BasicSchemeFactory.newInstance(BasicSchemeFactory.java:64)
        at org.apache.http.auth.AuthSchemeRegistry.getAuthScheme(AuthSchemeRegistry.java:113)
        at org.apache.http.auth.AuthSchemeRegistry$1.create(AuthSchemeRegistry.java:149)
        at org.apache.http.impl.client.AuthenticationStrategyImpl.select(AuthenticationStrategyImpl.java:175)
        at org.apache.http.impl.client.TargetAuthenticationStrategy.select(TargetAuthenticationStrategy.java:43)
        at org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge(HttpAuthenticator.java:154)
        at org.apache.http.impl.client.HttpAuthenticator.authenticate(HttpAuthenticator.java:58)
        at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1057)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
        at org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor.executeHttpPost(HttpComponentsHttpInvokerRequestExecutor.java:214)
        at org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor.doExecuteRequest(HttpComponentsHttpInvokerRequestExecutor.java:148)
        at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:138)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:194)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:176)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144)
        ... 5 more
ERROR - Error occurred while polling device

Environment

Spectrum version 10.4.1

Resolution

Edit the $SPECROOT/Install-Tools/SRM-Tools/common.sh file.

Look for the line that reads as follows:

CLASSPATH="$FILE_SEP${COMMON_JARS}/httpclient-4.3.5.jar$FILE_SEP${COMMON_JARS}/httpcore-4.3.2.jar$FILE_SEP${COMMON_JARS}/commons-codec-1.10.jar$FILE_SEP$CLASSPATH"

 

Change the above line to read as follows:

CLASSPATH="$FILE_SEP${COMMON_JARS}/httpclient-4.3.5.jar$FILE_SEP${COMMON_JARS}/httpcore-4.3.2.jar$FILE_SEP${COMMON_JARS}/commons-codec-1.11.jar$FILE_SEP$CLASSPATH"