SRM reconcile script fails on Linux

Document ID : KB000097626
Last Modified Date : 21/09/2018
Show Technical Document Details
Issue:
When running the Spectrum Report Manager (SRM) $SPECROOT/Install-Tools/SRM-Tools/reconcile_reporting_db.sh script on Linux, the script fails with the following error:

[spectrum@spectrum SRM-Tools]$ ./reconcile_reporting_db.sh -s spectrum -p 8080 -u spectrum -w spectrum -l spectrum
Started Cleaning reporting data on landscape "spectrum"
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.cleanPolledData(Unknown Source)
        at com.aprisma.spectrum.app.repmgr.util.DBReconcileServiceClient.callService(Unknown Source)
        at com.aprisma.spectrum.app.repmgr.util.DBReconcileServiceClient.main(Unknown Source)
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 attempting to poll for events
 
Environment:
Spectrum SRM 10.x running on Linux
Resolution:
This issue is sceduled to be addressed in Spectrum 10.03.00 when released.

As a workaround:

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

2. Change the line:
 
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$CLASSPATH"
 
To:
 
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"
 
3. Restart the SRM tomcat server and wait for SRM to start ( i.e we will see message “will be reported on” in catalina.out )
 
4. Run the reconcile_reporting_db.sh script as normal
Additional Information:
Please reference the "Reconcile CA Spectrum Report Data" section of the documentation located at https://docops.ca.com/ca-spectrum/10-2-3/en/installing-and-upgrading/install-report-manager/maintenance-and-troubleshooting/reporting-database-management#ReportingDatabaseManagement-ReconcileCASpectrumReportData for more information about running the reconcile_reporting_db.sh script.