我曾尝试在Weblogic 9.2.1上部署应用程序,但我收到了此错误:
org.richfaces.component.html.HtmlSubTable
javax.faces.FacesException: javax.faces.FacesException: Cant instantiate class: org.richfaces.component.html.HtmlSubTable.
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:545)
at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1302)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:397)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:376)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace
javax.faces.FacesException: Cant instantiate class: org.richfaces.component.html.HtmlSubTable.
at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1016)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:539)
at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1302)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:397)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:376)
Truncated. see log file for complete stacktrace
java.lang.NoClassDefFoundError: javax/faces/component/visit/VisitContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)
at java.beans.Introspector$1.run(Introspector.java:1265)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
Truncated. see log file for complete stacktrace
我已经尝试了很多东西来解决这个问题,但到目前为止我还没有理解这个问题。我检查了WEB-INF / lib上的libs,并且libs是正确的。 我认为这个问题是由Weblogic的库JSF发生的。
答案 0 :(得分:4)
java.lang.NoClassDefFoundError: javax/faces/component/visit/VisitContext
这是JSF 2.0 specific,这又需要一个Servlet 2.5容器,其中web.xml
声明符合Servlet 2.5规范。我不做Weblogic,所以我不能从头顶说出来,但Google告诉我Weblogic 9.2.x是一个Servlet 2.4容器。
因此,无论如何,JSF 2.0都无法在Weblogic 9.2.x上运行。您有两个选择:
你可以理论但是用特定的lib破解你的JSF 2.0 webapp,让它在servlet 2.4容器上运行。我不保证它会与RichFaces一起在Weblogic上完美运行。
答案 1 :(得分:0)
可能与WebLogic JAR发生冲突。要么删除你的,要么告诉WebLogic更喜欢使用<prefer-web-inf-classes>
在WEB-INF / lib中找到的类:
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html