技術是 spring-web-flow2.3.0。 JSF2.0 springsecurity3.0 primefaces4.0沒有互聯網PrimeFaces 4.0不能正常工作
我得到下面的錯誤。 請建議我....
錯誤:
18:15:47076 ERROR [org.springframework.web.context.ContextLoader(MSC服務線程1-5)上下文初始化失敗:org.springframework .beans.factory.parsing.BeanDefinitionParsingException:配置問題:無法從相對位置導入bean定義[webmvc-config.xml] 違規資源:ServletContext資源[/WEB-INF/config/web-application-config.xml];嵌套異常是org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:來自ServletContext資源的XML文檔中的第11行[/WEB-INF/config/webmvc-config.xml]無效;嵌套異常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是嚴格的,但是對元素的'faces:resources'沒有聲明。 at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.beans.factory .parsing.ReaderContext.error(ReaderContext.java:85)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext。 java:76)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at 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] at java.lang.Thread.run(Thread.java:722)[rt.jar: 1.7.0_03] 原因:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:Li來自ServletContext資源的XML文檔中的ne 11無效[/WEB-INF/config/webmvc-config.xml];嵌套異常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是嚴格的,但是對元素的'faces:resources'沒有聲明。 at 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] at 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'沒有聲明。 在org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196) 在org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132) 在org.apache.xerces.jaxp。 DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) at 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)[彈簧豆-3.2.1.RELEASE.jar:3.2.1.RELEASE] ... 30更
18:15:47,096錯誤[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資源[/WEB-INF/config/web-application-config.xml];嵌套異常是org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:來自ServletContext資源的XML文檔中的第11行[/WEB-INF/config/webmvc-config.xml]無效;嵌套異常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是嚴格的,但是對元素的'faces:resources'沒有聲明。 at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.beans.factory .parsing.ReaderContext.error(ReaderContext.java:85)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java: 294)[spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at 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:] at 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) at 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] at java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03] 原因:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:來自ServletContext資源的XML文檔中的第11行[/ WEB -INF /配置/ webmvc-config.xml中] 是無效的;嵌套異常是org.xml.sax.SAXParseException; lineNumber:11; columnNumber:21; cvc-complex-type.2.4.c:匹配的通配符是嚴格的,但是對元素的'faces:resources'沒有聲明。 at 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)[彈簧豆-3.2.1.RELEASE.jar:3.2.1.RELEASE] 在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader。 java:302)[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE] at 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'沒有聲明。 在org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196) 在org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132) 在org.apache.xerces.impl。 XMLErrorReporter.reportError(XMLErrorReporter.java:390) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[spring-beans-3.2.1.RELEASE.jar:3.2.1。發佈] at 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信息[javax.enterprise.resource.webcontainer.jsf.config](MSC服務線程1-5)初始化Mojarra 2.1.7-jbossorg-1(20120227-1401)上下文'/ eSociety- web' 18:15:50,509信息[org.primefaces.webapp.PostConstructApplicationEventListener](MSC服務線程1-5)在PrimeFaces 4.0上運行 18:15:50,527信息[org.primefaces.extensions.application.PostConstructApplicationEventListener](MSC服務線程1-5)在PrimeFaces Extensions上運行0.6.3 18:15:50,588錯誤[org.apache.catalina.core.StandardContex t](MSC服務線程1-5)Error listenerStart 18:15:50,588 ERROR [org.apache.catalina.core.StandardContext](MSC service thread 1-5)上下文[/ eSociety-web]啓動失敗錯誤 18:15:50,589信息[org.apache.catalina.core.ContainerBase。[jboss.web]。[default-host]。[/ eSociety-web]](MSC服務線程1-5)關閉Spring根WebApplicationContext 18:15:50,589信息[org.springframework.web.context.support.XmlWebApplicationContext](MSC服務線程1-5)關閉根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未初始化 - 調用'refresh'在通過上下文組播事件之前:Root WebApplicationContext:啓動日期[Fri Jan 31 18:14:22 IST 2014];上下文層次結構的根目錄 at 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] at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java: 1049)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE] at 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] at 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拋出的異常close:java.lang.IllegalStateException:LifecycleProcessor未初始化 - 調用'refresh'在通過上下文調用生命週期方法之前:根WebApplicationContext:啓動日期[Fri Jan 31 18:14:22 IST 2014];上下文層次結構的根目錄 at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.context .support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java: 1010)[spring-context-3.2.1.RELEASE.jar:3.2.1.RELEASE] at 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] at 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未初始化或已關閉 - 在org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)上通過ApplicationContext訪問Bean之前調用'refresh'[spring-context-3.2.1.RELEASE。罐子:3.2.1.RELEASE] 在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] at java.lang.Thread.run(Thread.java: 722)[rt.jar:1.7.0_03]
18:15:50,616錯誤[org.jboss.msc .service.fail](MSC服務線程1-5)MSC00001:無法啓動服務jboss.web.deployment.default-host./eSociety-web:服務jboss.web.deployment中的org.jboss.msc.service.StartException .default-host。/ eSociety-web:JBAS018040:無法在org.jboss.as.wep.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] at 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>
您是否檢查錯誤信息?這條線呢? '來自ServletContext資源的XML文檔中的第11行[/WEB-INF/config/webmvc-config.xml]是無效的;' – ToBe
在行號11處,我寫的是「 」,如果我將刪除這個總數項目無法正常工作......即總UI頁面顯示不正確 –
Pravin
我們不僅僅需要這一行。我會建議通過一些XML驗證器來運行它。甚至有在線的。谷歌是你的朋友。 – ToBe