Smarts NCM: NCM SmartsAdapter won't start in v9.4.2 following upgrade
book
Article ID: 330877
calendar_today
Updated On:
Products
VMware Smart Assurance
Issue/Introduction
Symptoms:
The user gets a 404 error as the webpage cannot be loaded
In the smarts adapter log : vc_smarts_adaptor.log the following error will be seen and smarts adapter startup will fail:
2016-10-20 09:06:05,650] context.ContextLoader ERROR Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:66) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory ... 13 more Caused by: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:234) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
Environment
VMware Smart Assurance - NCM
Cause
This is caused by an incompatible version of sl4j.jar files present in smarts adapter webapp in the following location: $VOYENCE_HOME/NCMSmartsAdapter/webapps/NCMSmartsAdapter-9.4.2.0/WEB-INF/lib/slf4j-api.jar
During the upgrade an older version of this file was kept.
Resolution
Follow the below steps to resolve the issue: 1) Stop the smarts adapter service. 2) Copy the latest compatible version of sl4j-api.jar from $VOYENCE_HOME/ncmcore/webapps/ncm-webapp/WEB-INF/lib/slf4j-api-1.6.4.jar to $VOYENCE_HOME/NCMSmartsAdapter/webapps/NCMSmartsAdapter-9.4.2.0/WEB-INF/lib/slf4j-api.jar 3) Start the smarts adapter service.