Application packaging MyFaces 2.x causes java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager in JBoss EAP 7

Solution Unverified - Updated -

Issue

  • We have myfaces-impl-2.1.0.jar in our application War class path and are getting the following error which we need to resolve:
javax.faces.FacesException: java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) [myfaces-api-2.1.0.jar:2.1.0]
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:294) [tomahawk20-1.1.11.jar:1.1.11]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [spring-security-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357) [tomahawk20-1.1.11.jar:1.1.11]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175) [undertow-servlet-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792) [undertow-core-1.3.21.Final-redhat-1.jar:1.3.21.Final-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager
    at org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.initManager(Tomcat7AnnotationLifecycleProvider.java:132) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.postConstruct(Tomcat7AnnotationLifecycleProvider.java:81) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:211) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:332) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:295) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.6.Final-redhat-1.jar:1.0.6.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:116) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.6.Final-redhat-1.jar:1.0.6.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) [myfaces-impl-2.1.0.jar:2.1.0]
    at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueExpressionToValueBinding.java:161) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.config.impl.digester.elements.ManagedProperty.getRuntimeValue(ManagedProperty.java:120) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:321) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:162) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:332) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:295) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.6.Final-redhat-1.jar:1.0.6.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:116) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.6.Final-redhat-1.jar:1.0.6.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) [myfaces-impl-2.1.0.jar:2.1.0]
    at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at com.sun.el.parser.AstValue.getBase(AstValue.java:150) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at com.sun.el.parser.AstValue.getValue(AstValue.java:199) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-impl-3.0.1.b08-redhat-1.jar:3.0.1.b08-redhat-1]
    at org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIOutput.getValue(UIOutput.java:71) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIInput.getValue(UIInput.java:142) [myfaces-api-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getValue(RendererUtils.java:343) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:291) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInputBegin(HtmlTextRendererBase.java:169) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:158) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:75) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519) [myfaces-api-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:540) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:521) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:538) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:316) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:151) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:672) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:668) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:668) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:668) [myfaces-api-2.1.0.jar:2.1.0]
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1483) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:281) [myfaces-impl-2.1.0.jar:2.1.0]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) [myfaces-api-2.1.0.jar:2.1.0]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) [myfaces-api-2.1.0.jar:2.1.0]
    at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93) [tomahawk20-1.1.11.jar:1.1.11]
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85) [myfaces-impl-2.1.0.jar:2.1.0]
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) [myfaces-impl-2.1.0.jar:2.1.0]
    ... 61 more
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager from [Module "javax.faces.api:myfaces-2.1.0" from local module loader @7bfcd12c (finder: local module finder @42f30e0a (roots: /home/jboss/modules,/home/jboss/modules/system/layers/base))]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In