gpt4 book ai didi

java - JSF2 和 RichFaces 错误

转载 作者:行者123 更新时间:2023-12-01 05:56:17 24 4
gpt4 key购买 nike

我正在尝试在工作的 JSF2 应用程序上使用 RichFaces。我合并了 RichFaces jar,更改了 web.xml,但出现以下错误:

17:49:13,097 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] Error Rendering View[/login.xhtml]: java.lang.NullPointerExcept
ion
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:936)
at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.createComponent(CompositeComponentTagHandler.java:154)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:311)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:145)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:120)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:204)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:75)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:301)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:360)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:339)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:191)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:149)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:75)
at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:145)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:716)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:351)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:541)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:479)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:407)
at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:318)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:243)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:559)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:872)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
at java.lang.Thread.run(Thread.java:619)

似乎有些 jar 丢失了,但我似乎找不到这个原因。日志中唯一吐出的就是上面的错误。

这是 web.xml:

<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/faces-validator-tags/general.taglib.xml;
/WEB-INF/faces-converter-tags/general.converter.taglib.xml
</param-value>
</context-param>
<!--
Startup Servlet <servlet> <servlet-name>StartUpServlet</servlet-name>
<servlet-class>pt.cgd.agile.util.StartupServlet</servlet-class>
<load-on-startup>1</load-on-startup> </servlet>
-->

<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>

<!-- Making the RichFaces skin spread to standard HTML controls -->
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>

<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>

<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>

<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

<!--
Just here so the JSF implementation can initialize, *not* used at
runtime
-->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Just here so the JSF implementation can initialize -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsf</form-login-page>
<form-error-page>/loginError.jsf</form-error-page>
</form-login-config>
</login-config>

<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/errors/error.jsf</location>
</error-page>

最佳答案

我们转向另一个组件库。我们正在部署到WAS,所以无论如何这是一个令人头痛的问题。

关于java - JSF2 和 RichFaces 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2851123/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com