1

由于 p:messages 的PrimeFaces错误,我尝试将与IBM WebSphere 7.0一起使用的MyFaces版本从 2.0.7 升级到 2.1.10。

不幸的是,我从 myFaces 页面下载的 myfaces-impl jar 不包含org/apache/myfaces/shared_impl/util/项目中已经存在的 2.0.7 版包中的许多实用程序类。

整个堆栈跟踪是:

java.lang.NoClassDefFoundError: org/apache/myfaces/shared_impl/util/ClassUtils
    at com.ibm.ws.jsf.config.annotation.WebSphere20LifecycleProviderFactory.getLifecycleProvider(WebSphere20LifecycleProviderFactory.java:34)
    at org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1048)
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:431)
    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:1708)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:381)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:732)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:617)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1127)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1272)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5343)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5431)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1277)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2048)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:599)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:561)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1184)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1331)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1224)
    at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:236)
    at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:113)
    at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:101)
    at com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1682)
    at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcessSynchronousExt(AppBinaryProcessor.java:723)
    at com.ibm.ws.management.bla.sync.BLABinaryProcessor.postProcess(BLABinaryProcessor.java:575)
    at com.ibm.ws.management.bla.sync.BLABinaryProcessor.onChangeCompletion(BLABinaryProcessor.java:452)
    at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1915)
    at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1424)
    at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
    at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:665)
    at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1954)
    at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1902)
    at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:511)
    at com.ibm.ws.management.configservice.ConfigServiceImpl.save(ConfigServiceImpl.java:702)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1331)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1224)
    at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
    at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:242)
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:595)
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

服务器上配置的共享库中使用的库:

C:\WebsphereSharedLibs\MyFaces_2.1.10\de.datev.myfaces_2.1.10.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\myfaces-api-2.1.10.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\myfaces-impl-2.1.10.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\commons-logging-1.1.1.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\commons-digester-1.8.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\commons-collections-3.2.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\commons-codec-1.3.jar
C:\WebsphereSharedLibs\MyFaces_2.1.10\commons-beanutils-1.8.3.jar
C:\IBM\SDP\runtimes\base_v7\optionalLibraries\IBM\JSFProviders\WebSphere-MyFaces20-annotation-provider.jar

那么,问题出在哪里?我自己没有下载 2.0.7 版本,所以也许它必须是特别丰富的版本才能与 WebSphere 一起使用?有没有办法将 MyFaces 2.1.10 与 WebSphere 一起使用,或者我可以只需要 IBM 团队准备的版本吗?

4

1 回答 1

2

请参阅 IBM 的此 APAR: http ://www-01.ibm.com/support/docview.wss?uid=swg1PM61211 :

WebSphere Application Server 添加了一个自定义注释提供程序来为 MyFaces 2.0.8+ 提供内置的注入引擎支持。提供程序代码打包在一个名为 WebSphere-MyFaces208-annotation-provider.jar 的新 jar 文件中,该文件位于 /optionalLibraries/IBM/JSFProviders/2.0.8 目录中。

此 APAR 的修复当前的目标是包含在修复包 7.0.0.25 中。

So you need to upgrade to at least 7.0.0.25, and you'll be able to use newer 2.0.x versions on MyFaces

于 2014-01-28T20:21:16.927 回答