Migration of jboss 6.1 to jboss EAP 6.3+

2019-09-14 13:26发布

问题:

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:

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/users@myfaces.apache.org/msg60648.html



标签: jboss-eap-6