Spring Faces 错误面:flow-builder-services

发布于 2024-08-10 10:57:35 字数 6177 浏览 5 评论 0原文

我有这个 Java Web 应用程序在带有 Web Flow 的 Spring 框架上运行。

我尝试将其与 spring faces 集成,但我在配置文件中收到此错误

org.xml.sax.SAXParseException:元素的前缀“flow” “flow:flow-executor”未绑定。

这是堆栈跟踪

org.xml.sax.SAXParseException:元素的前缀“flow” “flow:flow-executor”未绑定。在 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(未知 来源)位于 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(未知 来源)位于 com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(未知 来源)于 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(未知 来源)于 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(未知 来源)于 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(未知 来源)于 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(未知 来源)位于 com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(未知 来源)于 com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(未知 来源)于 org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) 在 org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) 在 org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) 在 org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java: 123)在 org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) 在 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) 在 org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402) 在 org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316) 在 org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282) 在 org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126) 在 javax.servlet.GenericServlet.init(GenericServlet.java:212) 处 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173) 在 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809) 在 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615) 在 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) 在 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) 在 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) 在 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706) 在 org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677) 在 org.apache.jsp.index_jsp._jspService(index_jsp.java:56) 处 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 位于 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 在 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 在 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 处 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在 org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 在 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) 在 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 在 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) 在 java.lang.Thread.run(来源不明)

I have this Java web app running on spring framework with web flow.

I tried integrating it with spring faces but I get this error in my config file:

org.xml.sax.SAXParseException: The prefix "flow" for element
"flow:flow-executor" is not bound.

Here's the stack trace

org.xml.sax.SAXParseException: The prefix "flow" for element
"flow:flow-executor" is not bound. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source) at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source) at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:
123) at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:212) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:615)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:56) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小镇女孩 2024-08-17 10:57:36

您应该在 XML 配置文件中明确指定名称空间前缀 flow: ,最好是在根元素上:

<?xml version="1.0" encoding="UTF-8"?>
<....  
     xmlns:flow="http://www.springframework.org/schema/webflow" 
     xsi:schemaLocation="
              http://www.springframework.org/schema/webflow
              http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"

You should explicitly specify the name space prefix flow: in your XML configuration file preferably on root element:

<?xml version="1.0" encoding="UTF-8"?>
<....  
     xmlns:flow="http://www.springframework.org/schema/webflow" 
     xsi:schemaLocation="
              http://www.springframework.org/schema/webflow
              http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文