Reputation: 4743
This is a question about xml files in a java project. I have a spring 4 project which can be downloaded from here - http://www.perfmath.com/spring/soba_zip/soba4_download_1.zip
Under src > main > webapp > web-inf > lib, the soba-webflow.xml
file is giving me many errors. I googled this and saw similar errors, but I did not find a method to correct it in my case. Please help.
Error 1 -
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-registry'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd', because 1) could not find the document; 2) the document could not be
read; 3) the root element of the document is not <xsd:schema>.
Error 2 -
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-executor'.
Code snippet from the xml file -
<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"
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-2.4.xsd">
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" >
<property name="flowRegistry" ref="flowRegistry" />
<property name ="order" value="1" />
</bean>
<bean name="flowHandlerAdapter" class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<webflow:flow-registry id="flowRegistry">
<webflow:flow-location
path="/WEB-INF/flows/onlineService/onlineService.xml" />
<webflow:flow-location
path="/WEB-INF/flows/customerSearch/customerSearch.xml" />
<webflow:flow-location
path="/WEB-INF/flows/customerDetails/customerDetails.xml" />
<webflow:flow-location
path="/WEB-INF/flows/transferMoney/transferMoney.xml" />
</webflow:flow-registry>
<webflow:flow-executor id="flowExecutor">
<webflow:flow-execution-listeners>
<webflow:listener ref="securityFlowExecutionListener" />
<webflow:listener ref="jpaFlowExecutionListener" />
</webflow:flow-execution-listeners>
</webflow:flow-executor>
Upvotes: 0
Views: 2963
Reputation: 3795
I downloaded the soba4_download_1.zip and observed that in pom.xml element you are refering to 2.3.3 version of webflow:
<spring.webflow.version>2.3.3.RELEASE</spring.webflow.version>
But where as in your soba-webflow.xml, you are referring to schema location of spring-webflow-config-2.4.xsd.
To resolve this you have 2 options:
Option 1:
Since you already have 2.3.3 webflow version, change spring-webflow-config schema location to:
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
Option 2:
Upgrade to webflow 2.4 version. In spring-webflow-2.4.0.RC1.jar, you have spring-webflow-config-2.4.xsd file included.
Upvotes: 2
Reputation: 328
If you are getting these errors from the IDE, make sure that the schema document http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
is accessible from it (network connection, proxy settings etc.). I could load the XML successfully in my Eclipse.
Upvotes: 0