将xml文件添加为bean配置时出现此错误消息:
发生错误处理 '/j2eeapp/src/main/webapp/WEB-INF/webflow-config.xml'
我的xml文件(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.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces.xsd">
<bean id="jpaFlowExecutionListener" class="org.springframework.webflow.persistence.JpaFlowExecutionListener">
<constructor-arg ref="entityManagerFactory" />
<constructor-arg ref="transactionManager" />
</bean>
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="jpaFlowExecutionListener" />
<webflow:listener ref="facesContextListener"/>
<webflow:listener ref="securityFlowExecutionListener"/>
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
<webflow:flow-location-pattern value="/**/*-flow.xml" />
</webflow:flow-registry>
<faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
<faces:resources />
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="order" value="1"/>
<property name="flowRegistry" ref="flowRegistry" />
<property name="defaultHandler">
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
</property>
</bean>
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<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 class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
</beans>
异常堆栈跟踪:
java.lang.NoClassDefFoundError:无法初始化类 org.springframework.faces.webflow.JsfRuntimeInformation at org.springframework.faces.config.ResourcesBeanDefinitionParser.parse(ResourcesBeanDefinitionParser.java:52) 在 org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74) 在 org.springframework.ide.eclipse.beans.core.internal.model.namespaces.DelegatingNamespaceHandlerResolver $ ElementTrackingNamespaceHandler.parse(DelegatingNamespaceHandlerResolver.java:177) 在 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1424) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ ErrorSuppressingBeanDefinitionParserDelegate.parseCustomElement(BeansConfig.java:1403) 在 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1414) 在 org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:187) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ ToolingFriendlyBeanDefinitionDocumentReader.doRegisterBeanDefinitions(BeansConfig.java:1333) 在 org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:110) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ 2.registerBeanDefinitions(BeansConfig.java:406) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ 2.loadBeanDefinitions(BeansConfig.java:390) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ 3.call(BeansConfig.java:449) 在 org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig $ 3.call(BeansConfig.java:1) 在java.util.concurrent.FutureTask.run(未知来源)at java.util.concurrent.Executors $ RunnableAdapter.call(Unknown Source) 在java.util.concurrent.FutureTask.run(未知来源)at java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源)at java.lang.Thread.run(未知来源)
错误是showb:
> <faces:resources/>
收到此消息:Could not initialise class org.springframework.faces.webflow.JsfRuntimeInformation
感谢您的帮助!