jsfwebsphere-9

Exception caught while initializing context: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester


After starting Websphere 9 server, I am getting an exception. Below mentioned exception stack trace.

 E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
                                 java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:42)
    at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getUnmarshaller(DefaultFacesConfigurationProvider.java:93)
    at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig(DefaultFacesConfigurationProvider.java:135)
    at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:69)
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:416)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:370)
    at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:143)
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1836)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:442)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:8

Can anyone help to fix this issue?


Solution

  • Make sure that you have all the dependencies of MyFaces and their corresponding versions.

    http://myfaces.apache.org/core22/dependency-management.html

    The last versions use commons-digester version 1.8.

    It could also be a classloader issue, maybe this link helps WAS 8.5.5 & MyFaces 2.1 Shared library