没有互联网PrimeFaces 4.0无法正常工作

时间:2014-01-31 13:48:24

标签: primefaces

技术是  弹簧网络flow2.3.0。  JSF2.0  springsecurity3.0  primefaces4.0

我低于错误。 请建议我....

错误:

18:15:47,076 ERROR [org.springframework.web.context.ContextLoader](MSC服务线程1-5)上下文初始化失败:org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:导入失败相对位置的bean定义[webmvc-config.xml] 违规资源:ServletContext资源[/WB-INF/config/web-application-config.xml];嵌套异常是org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自ServletContext资源[/WEB-INF/config/webmvc-config.xml]的XML文档中的第11行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     在org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03] 引起:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自ServletContext资源[/WEB-INF/config/webmvc-config.xml]的XML文档中的第11行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:255)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ......还有27个 引起:org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)     at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)     在org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)     在org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ......还有30多个

18:15:47,096 ERROR [org.apache.catalina.core.ContainerBase。[jboss.web]。[default-host]。[/ eSociety-web]](MSC服务主题1-5)异常发送上下文初始化事件到类的监听器实例org.springframework.web.context.ContextLoaderListener:org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:无法从相对位置导入bean定义[webmvc-config.xml] 违规资源:ServletContext资源[/WB-INF/config/web-application-config.xml];嵌套异常是org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自ServletContext资源[/WEB-INF/config/webmvc-config.xml]的XML文档中的第11行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     在org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)[jbossweb-7.0.13.Final.jar:]     at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)[jbossweb-7.0.13.Final.jar:]     在org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]     at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1811)     at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1746)     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03] 引起:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自ServletContext资源[/WEB-INF/config/webmvc-config.xml]的XML文档中的第11行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:255)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ......还有27个 引起:org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素' faces的声明:resources'。     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)     at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)     at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:390)     at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)     在org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)     在org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]     ......还有30多个

18:15:47,249 INFO [javax.enterprise.resource.webcontainer.jsf.config](MSC服务主题1-5)为上下文'初始化Mojarra 2.1.7-jbossorg-1(20120227-1401)。 / eSociety幅' 18:15:50,509 INFO [org.primefaces.webapp.PostConstructApplicationEventListener](MSC服务主题1-5)在PrimeFaces 4.0上运行 18:15:50,527 INFO [org.primefaces.extensions.application.PostConstructApplicationEventListener](MSC服务主题1-5)在PrimeFaces Extensions上运行0.6.3 18:15:50,588 ERROR [org.apache.catalina.core.StandardContext](MSC服务线程1-5)错误listenerStart 18:15:50,588 ERROR [org.apache.catalina.core.StandardContext](MSC服务主题1-5)上下文[/ eSociety-web]启动由于先前的错误而失败 18:15:50,589 INFO [org.apache.catalina.core.ContainerBase。[jboss.web]。[default-host]。[/ eSociety-web]](MSC服务主题1-5)关闭Spring root WebApplicationContext 18:15:50,589 INFO [org.springframework.web.context.support.XmlWebApplicationContext](MSC服务主题1-5)关闭Root WebApplicationContext:启动日期[Fri Jan 31 18:14:22 IST 2014];上下文层次结构的根 18:15:50,591 WARN [org.springframework.web.context.support.XmlWebApplicationContext](MSC服务线程1-5)从ApplicationListener处理抛出的异常处理ContextClosedEvent:java.lang.IllegalStateException:ApplicationEventMulticaster未初始化 - 调用'刷新& #39;在通过上下文组播事件之前:Root WebApplicationContext:启动日期[Fri Jan 31 18:14:22 IST 2014];上下文层次结构的根     在org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03]

18:15:50,596 WARN [org.springframework.web.context.support.XmlWebApplicationContext](MSC服务线程1-5)在上下文关闭时从LifecycleProcessor抛出异常:java.lang.IllegalStateException:LifecycleProcessor未初始化 - 调用& #39;刷新'在通过上下文调用生命周期方法之前:Root WebApplicationContext:启动日期[Fri Jan 31 18:14:22 IST 2014];上下文层次结构的根     在org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03]

18:15:50,600 ERROR [org.apache.catalina.core.ContainerBase。[jboss.web]。[default-host]。[/ eSociety-web]](MSC服务主题1-5)异常发送上下文将事件销毁到类的监听器实例org.springframework.web.context.ContextLoaderListener:java.lang.IllegalStateException:BeanFactory未初始化或已经关闭 - 调用'刷新'在通过ApplicationContext访问bean之前     at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE]     at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1746)     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03]

18:15:50,616 ERROR [org.jboss.msc.service.fail](MSC服务主题1-5)MSC00001:无法启动服务jboss.web.deployment.default-host./eSociety-web:org服务中的.jboss.msc.service.StartException jboss.web.deployment.default-host。/ eSociety-web:JBAS018040:无法启动上下文     在org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)     at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1811)[jboss-msc-1.0.2.GA.jar:1.0.2.GA]     at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1746)[jboss-msc-1.0.2.GA.jar:1.0.2.GA]     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603) ]

This is my webmvc-flow.xml
please suggest me.....

<?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: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/faces http://www.springframework.org/schema/faces/spring-faces-2.4.xsd
        http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">

    <faces:resources />

    <!-- Maps request URIs to controllers.  Here we have two kinds of flows one  is login flow and another is main flow   -->           
    <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
            <value>
                /main=flowController
                /login=loginController
            </value>
        </property>
        <property name="defaultHandler">
            <!-- Selects view names to render based on the request URI: e.g. /main selects "main" -->   
            <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
        </property>
    </bean>

    <!-- it is used to handle the flow control Adaptor in 2.3.0.   This will come from spring framework.web.servlet3.2.1 -->
    <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />

    <!-- it trigers to the loginFlowController -->
    <bean id="loginController" class="com.LoginFlowController">
        <property name="flowExecutor" ref="flowExecutor"/>
    </bean>

    <!-- Handles requests mapped to the Spring Web Flow system and ajaxHandler.
    after security we need to enable the ajax for that we need to write one property i.e ajaxHandler -->
    <bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
        <property name="flowExecutor" ref="flowExecutor" />
         <property name="ajaxHandler">
        <bean class="org.springframework.faces.webflow.JsfAjaxHandler"/>
    </property>
    </bean>

    <!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' -->
    <bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
        <property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
        <property name="prefix" value="/WEB-INF/" />
        <property name="suffix" value=".xhtml" />
    </bean>

    <bean id="facesContextListener"  class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />

   <!-- ========================= MESSAGE SOURCE DEFINITION ========================= -->
    <bean id="messageSource"
    class="org.springframework.context.support.ResourceBundleMessageSource">
    <property name="basename" value="messages" />

</bean>

</beans>

1 个答案:

答案 0 :(得分:1)

有同样的问题!

使用架构位置

  

http://www.springframework.org/schema/faces/spring-faces-2.2.xsd

而不是

  

http://www.springframework.org/schema/faces/spring-faces-2.4.xsd

(正如官方文件中所提出的)就像一个魅力!