面对在WAS 8.5.5.16中使用MyFaces 2.3时出现的’初始化MyFaces时发生错误’问题。

huangapple go评论83阅读模式
英文:

Facing issues 'An error occured while initializing MyFaces' in WAS 8.5.5.16 with Myfaces 2.3

问题

0000005c 抽象Faces E 在初始化MyFaces时发生错误:类com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider不是org.apache.myfaces.spi.AnnotationProvider
java.lang.IllegalArgumentException: 类com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider不是org.apache.myfaces.spi.AnnotationProvider
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:567)
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:534)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.resolveAnnotationProviderFromService(DefaultAnnotationProviderFactory.java:138)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.createAnnotationProvider(DefaultAnnotationProviderFactory.java:93)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.getAnnotationProvider(DefaultAnnotationProviderFactory.java:62)
at org.apache.myfaces.config.annotation.AnnotationConfigurator.createFacesConfig(AnnotationConfigurator.java:90)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getAnnotationsFacesConfig(DefaultFacesConfigurationProvider.java:201)
at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:92)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:603)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:456)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:190)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1736)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1211)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1462)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1040)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:795)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2279)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5482)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5698)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2284)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

英文:

I am trying to deploy Myfaces 2.3 base application in WAS 8.5.5.16 with Java 8 but facing below mention error.

0000005c AbstractFaces E An error occured while initializing MyFaces: Class com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider is no org.apache.myfaces.spi.AnnotationProvider
java.lang.IllegalArgumentException: Class com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider is no org.apache.myfaces.spi.AnnotationProvider
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:567)
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:534)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.resolveAnnotationProviderFromService(DefaultAnnotationProviderFactory.java:138)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.createAnnotationProvider(DefaultAnnotationProviderFactory.java:93)
at org.apache.myfaces.spi.impl.DefaultAnnotationProviderFactory.getAnnotationProvider(DefaultAnnotationProviderFactory.java:62)
at org.apache.myfaces.config.annotation.AnnotationConfigurator.createFacesConfig(AnnotationConfigurator.java:90)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getAnnotationsFacesConfig(DefaultFacesConfigurationProvider.java:201)
at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:92)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:603)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:456)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:190)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1736)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1211)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1462)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1040)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:795)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2279)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5482)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5698)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2284)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

答案1

得分: 2

WebSphere 8.5.5默认提供了MyFaces JSF 2.0实现。这个IllegalArgumentException表明WAS提供的JSF实现仍然启用着,而你的应用程序提供的MyFaces 2.3实现与之冲突。

你需要按照IBM的说明[1]来使用“第三方JSF实现”:将服务器配置为使用Sun RI 1.2作为JSF,而不是“default”或“MyFaces”,并将你的MyFaces 2.3实现及其依赖项作为隔离的共享库提供。

[1] https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/tweb_jsf.html

英文:

WebSphere 8.5.5 by default provides the MyFaces JSF 2.0 implementation. This IllegalArgumentException suggests that the WAS-provided JSF implementation is still enabled, and that the MyFaces 2.3 implementation you're providing with your app is conflicting with it.

You need to follow IBM's instructions[1] for using a "third-party JSF implementation": configure the server to use Sun RI 1.2 for JSF instead of "default" or "MyFaces", and provide your MyFaces 2.3 implementation and its dependencies as an isolated shared library.

[1] https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/tweb_jsf.html

huangapple
  • 本文由 发表于 2020年6月29日 16:50:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/62634466.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定