Starting the Tomcat instance in vFabric GemFire fails with the error: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
search cancel

Starting the Tomcat instance in vFabric GemFire fails with the error: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

book

Article ID: 293352

calendar_today

Updated On:

Products

VMware Tanzu tc Server

Issue/Introduction

Symptoms:
The following problems occur:
  • Cannot start the Tomcat instance in vFabric GemFire
  • After the vFabric GemFire HTTP Session Management Module 2.x installation and configuration completes, you see the error:
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at com.gemstone.gemfire.modules.session.bootstrap.AbstractCache.<clinit>(AbstractCache.java:37)
    at com.gemstone.gemfire.modules.session.catalina.ClientServerCacheLifecycleListener.<init>
    ClientServerCacheLifecycleListener.java:8)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145)
    at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
    

Environment


Cause

This issue occurs because the vFabric GemFire HTTP Session Management Module 2.x for Tomcat does not contain the necessary slf4j jar files, such as slf4j-api-1.5.8.jar and slf4j-jdk14-1.5.8.jar.

Resolution

To work around this issue: 

  1. Download the VMware vFabric GemFire HTTP Session Management Module 2.X for AppServers from the Brodcom Support Portal.
  2. Copy the slf4j jar files from the downloaded module to the Tomcat lib folder at CATALINA_HOME/lib.