当前位置: 首页 > 知识库问答 >
问题:

jsf 2.0+springwebflow 2.0中不支持的异常

易宣
2023-03-14

我开始使用以下技术创建一个项目

JSF 2.0 
Springwebflow 2.0
Primefaces 2.2.1
Richfaces 3.3
Appserver : JBOSS-AS-7.1.1 Final

我的应用程序部署成功,但当我试图运行它时…我得到以下异常,

NestedServletException:请求处理失败;嵌套异常是org.springframework.webflow.execution.flowExecutionException:异常以流'main'org.springframework.web.servlet.frameworkservlet.processRequest(frameworkservlet.java:583)org.springframework.web.servlet.frameworkservlet.doget(app.baseFilter.HandlerEquest(BaseFilter.java:290)org.ajax4jsf.webapp.baseFilter.processSuploadSandHandlerEquest

根本原因

org.springframework.webflow.execution.flowExecutionExceptionExceptionImpl.wrap(flowExecutionImpl.java:569)org.springframework.webflow.engine.impl.flowExecutionImpl.resume(flowExecutionImpl.java:263)org.springframework.webflow.executor.flowExecutionImpl.resumeExecution(flowExecutionImpl.java:163)(flowController.java:174)org.springframework.web.servlet.mvc.simpleControllerHandlerAdapter.handle(simpleControllerHandlerAdapter.handle(simpleControllerHandlerAdapter.java:48)org.springframework.web.servlet.dispatcherServlet.doDispatch(dispatcherServlet.java:875)org.springframework.web.servlet.dispatcherServlet.doDisprameworkServlet.doget(frameworkServlet.java:501)javax.servlet.http.httpservlet.service(httpservlet.java:734)javax.servlet.http.httpservlet.service(httpservlet.java:847)org.ajax4jsf.webapp.basexmlfilter.doxmlfilter(basexmlfilter.java:178)org.ajax4jsf.webapp.basefilter.handlerequest baseFilter.doFilter(baseFilter.java:515)org.springframework.web.filter.characterEncodingFilter.doFilterInternal(characterEncodingFilter.java:96)org.springFramework.web.filter(oncePerRequestFilter.java:76)

根本原因

知道原因是什么吗?

my faces-config.xml

<?xml version="1.0"?>

<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">

</faces-config>

my web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    version="2.5">

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/config/web-application-config.xml
        </param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- 
        JSF 2 IMPLEMENTATION
    -->
    <!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>

    <!-- Enables special Facelets debug output during development -->
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>

    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>
    <!-- Causes Facelets to refresh templates during development -->
    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>1</param-value>
    </context-param>
    <!-- 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>*.faces</url-pattern>
    </servlet-mapping>

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

    <filter>
        <filter-name>charEncodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>charEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>



    <servlet>
        <servlet-name>Resources Servlet</servlet-name>
        <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Resources Servlet</servlet-name>
        <url-pattern>/resources/*</url-pattern>
    </servlet-mapping>

    <!-- 
        SPRING MVC
    -->
    <servlet>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value></param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <url-pattern>/spring/*</url-pattern>
    </servlet-mapping>


    <context-param>
        <param-name>
            javax.servlet.jsp.jstl.fmt.localizationContext
        </param-name>
        <param-value>resources.application</param-value>
    </context-param>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

</web-app>

my webflow-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:webflow="http://www.springframework.org/schema/webflow-config"
       xmlns:faces="http://www.springframework.org/schema/faces"
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/webflow-config
           http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
           http://www.springframework.org/schema/faces
           http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">

    <!-- Executes flows: the central entry point into the Spring Web Flow system -->
    <webflow:flow-executor id="flowExecutor">
        <webflow:flow-execution-repository max-executions="1" />
        <webflow:flow-execution-attributes>
            <webflow:always-redirect-on-pause value="true"/>
        </webflow:flow-execution-attributes>
        <webflow:flow-execution-listeners>
            <webflow:listener ref="securityFlowExecutionListener" />

        </webflow:flow-execution-listeners>
    </webflow:flow-executor>

    <!-- The registry of executable flow definitions -->
    <webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
        <webflow:flow-location-pattern value="/**/*-flow.xml" />
    </webflow:flow-registry>

    <!-- Configures the Spring Web Flow JSF integration -->
    <faces:flow-builder-services id="facesFlowBuilderServices" development="true" />

    <!-- Installs a listener to apply Spring Security authorities -->
    <bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />


</beans>

共有1个答案

陈德泽
2023-03-14

将您的jsf升级到2.2.15,就像我在我的项目中遇到的问题一样!

 类似资料:
  • 相反,将引发“UnsupportedOperationException”。看起来ContainerRequest没有从修改的请求中提取UserPrincipal。 修改是通过 问题是如何将主体信息从HttpServerProbe传输到ContainerRequestFilter。request具有安全信息(在本例中是SSL客户机证书信息),而com.sun.jersey.spi.containe

  • 所以我试着从一个字符串中使用getBytes,我知道如果它遇到一个不能变成真实数据的字符,它会抛出一个UnsupportedEncodingException。我添加了java.io来提供异常,但是当我把它放到try catch语句中时,我得到了“UnsupportedEncodingException的不可到达的catch块。此异常从不从try语句体中引发" 这是我的确切结构。myCharact

  • Dart 的库充满了返回 Future 或 Stream 对象的函数。这些函数是“异步的”:它们在设置一个可能比较耗时的操作(比如 I/O)后返回,而不去等待操作完成。 关键字 async 和 await 支持异步编程,可以使你用看起来像同步的方式编写异步代码。 处理 Futures 当你需要一个已完成的 Future 的结果时,你有两个选择: 使用 async 和 await。 使用 Futur

  • 我不知道;我不太明白在哪里可以抛出这个异常。 例如,我正在实现

  • 问题内容: 我正在编写代码。在我获得android v 9.0(Pie)的更新之后,它在版本8(Oreo)上运行良好,并且应用突然停止工作。检查后,我在我的Asyn任务中收到一条错误消息,指出以下错误: 任何人都可以帮我解决这个问题的确切原因,因为它之前工作得很好。先感谢您。 问题答案: 我也遇到了同样的问题,但是在清单文件中添加以下代码后,问题得到解决 作为参考,您还可以检查以下网址:https

  • 在使用boto3 for python实现aws textract时。 代码: 下面是aws的凭证和配置文件 我得到了一个例外: 我对AWS textract有点陌生,任何帮助都将不胜感激。