0
votes

Please help on below exception: java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager

Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager
    at org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.initManager(Tomcat7AnnotationLifecycleProvider.java:132) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.postConstruct(Tomcat7AnnotationLifecycleProvider.java:81) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:213) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:333) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:296) [myfaces-impl-2.1.5.jar:2.1.5]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.4.Final-redhat-1.jar:1.0.4.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:123) [myfaces-impl-2.1.5.jar:2.1.5]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.4.Final-redhat-1.jar:1.0.4.Final-redhat-1]
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:144) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96) [myfaces-impl-2.1.5.jar:2.1.5]
    at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIOutput.getValue(UIOutput.java:67) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIInput.getValue(UIInput.java:150) [myfaces-api-2.1.5.jar:2.1.5]
    at org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:64) [primefaces-3.5.jar:]
    at org.primefaces.component.inputtext.InputTextRenderer.encodeMarkup(InputTextRenderer.java:77) [primefaces-3.5.jar:]
    at org.primefaces.component.inputtext.InputTextRenderer.encodeEnd(InputTextRenderer.java:51) [primefaces-3.5.jar:]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:580) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:762) [myfaces-api-2.1.5.jar:2.1.5]
    at org.primefaces.component.panelgrid.PanelGridRenderer.encodeDynamicBody(PanelGridRenderer.java:92) [primefaces-3.5.jar:]
    at org.primefaces.component.panelgrid.PanelGridRenderer.encodeBody(PanelGridRenderer.java:60) [primefaces-3.5.jar:]
    at org.primefaces.component.panelgrid.PanelGridRenderer.encodeEnd(PanelGridRenderer.java:49) [primefaces-3.5.jar:]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:580) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:762) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:758) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:758) [myfaces-api-2.1.5.jar:2.1.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:758) [myfaces-api-2.1.5.jar:2.1.5]
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1900) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285) [myfaces-impl-2.1.5.jar:2.1.5]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) [myfaces-api-2.1.5.jar:2.1.5]
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115) [myfaces-impl-2.1.5.jar:2.1.5]
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) [myfaces-impl-2.1.5.jar:2.1.5]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199) [myfaces-api-2.1.5.jar:2.1.5]
    ... 22 more
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager from [Module "deployment.RosteringEAR.ear:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:447) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:414) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1]
    ... 59 more
1
Did you configure it to use MyFaces or are you including MyFaces in your deployment?James R. Perkins
I did not configure anything . I have excluded the myfaces and myfaces-impl files from modules\system\layers\base\javax\faces\api\main and modules\system\layers\base\com\sun\jsf-impl\main path. My jboss-deployment-structure.xml content is like this---Jay prakash sah Sah
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <exclusions> <module name="javax.faces.api" slot="main" /> <module name="com.sun.jsf-impl" slot="main" /> </exclusions> </deployment> </jboss-deployment-structure>Jay prakash sah Sah
I am not able to find the issue yet? Need help\Jay prakash sah Sah
Why are you excluding the provided JSF API's? It's usually not advised to use your own implementation. Have a look at this developer.jboss.org/wiki/DesignOfAS7Multi-JSFFeature.James R. Perkins

1 Answers

0
votes

with WildFly 11 I had to add this context parameter to the web.xml:

<context-param>
 <param-name>org.apache.myfaces.config.annotation.LifecycleProvider</param-name>
 <param-value>org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider</param-value>
</context-param>

see: https://www.mail-archive.com/[email protected]/msg60648.html