ICEFaces 1.7.2 和 Websphere 应用程序服务器 7
我们最近从 WAS6 迁移到 WAS7。我们的一个应用程序在 WAS6 中运行得很好,但在 WAS7 中却无法运行,并出现以下错误。
java.lang.NoSuchMethodError: com/sun/faces/util/Util.verifyFactoriesAndInitDefaultRenderKit(Ljavax/servlet/ServletContext;)V
at com.ibm.faces.context.MultipartFacesContextFactoryImpl.getFacesContext(MultipartFacesContextFactoryImpl.java:73)
给出该错误的代码片段是
FacesContextFactory contextFactory = (FacesContextFactory)
FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
facesContext = contextFactory.getFacesContext(
request.getSession().getServletContext(), request, response, lifecycle);
在 WAS6 与 WAS7 中调试应用程序时找到这些信息 contextfactory:com.ibm.faces.context.MultipartFacesContextFactoryImpl - JSF-IBM.jar - WAS7 contextfactory:com.icesoft.faces.context.FacesContextFactoryImpl -icefaces.jar -WAS6
我尝试了一些建议,例如创建共享库并将其与 EAR 关联,并将类加载器方案从“Parent Last”更改为“Parent First”。
但无论我做什么,在 WAS7 中,我都会将 MultipartFacesContextFactoryImpl 作为 contextFactory 的值。
我尝试用 1.8 版本的icefaces.jar 和icefaces-comps.jar 替换1.7.2。但结果还是一样。
请帮忙。如果您需要更多详细信息,请告诉我。
We recently migrated from WAS6 to WAS7. One of our application, which was working perfectly fine in WAS6 is not working in WAS7 with following error.
java.lang.NoSuchMethodError: com/sun/faces/util/Util.verifyFactoriesAndInitDefaultRenderKit(Ljavax/servlet/ServletContext;)V
at com.ibm.faces.context.MultipartFacesContextFactoryImpl.getFacesContext(MultipartFacesContextFactoryImpl.java:73)
The piece of code, which is giving that error is
FacesContextFactory contextFactory = (FacesContextFactory)
FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
facesContext = contextFactory.getFacesContext(
request.getSession().getServletContext(), request, response, lifecycle);
Found these info while debugging the app in WAS6 vs WAS7
contextfactory: com.ibm.faces.context.MultipartFacesContextFactoryImpl - JSF-IBM.jar - WAS7
contextfactory: com.icesoft.faces.context.FacesContextFactoryImpl - icefaces.jar - WAS6
I tried some suggestions like creating a Shared Lib and associating that to the EAR and changing the class loader schemes from "Parent Last" to "Parent First".
But no matter what I do, In WAS7 I am getting MultipartFacesContextFactoryImpl as the value of contextFactory.
I tried to replace 1.7.2 with 1.8 version of icefaces.jar and icefaces-comps.jar. But still the same result.
Please help. Please let me know if you need more details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是 WAS6 使用 Java 5 作为本机,而 WAS7 使用 Java 6。尝试使用 Java 6 重新编译您的类。
It could be that WAS6 used Java 5 as native and WAS7 uses Java 6. Try recompiling your classes with Java 6.