Failed to read 'http://www.springframework.org/schema/context/spring--context-3.0.xsd
Hello,
I have create this simple "Hello World" project: http://viralpatel.net/blogs/spring-3...-spring-3-mvc/ using Spring 3.1.2 and STS 3.1.0 as IDE
The project run well and I can see first the welcome page that show the link "Say Hello", and if here I click on this link open the page with the Hello message: "Hello World, Spring 3.0!"
But I have 2 strange errors reported in Eclipse in my spring-servlet.xml configuration file:
This is my spring-servlet.xml file content:
Code:
<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="net.viralpatel.spring3.controller" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
The first reported errors is at line 11:
Code:
http://www.springframework.org/schema/context/spring-context.xsd">
This error is reported by the red circle icon whith cross inside and say me the following error message if I pass the mouse over the icons:
Multiple annotations found at this line:
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-3.0.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>
The second error is at line 13:
Code:
<context:component-scan base-package="net.viralpatel.spring3.controller" />
This error is reported by yellow triangle icon with an exclamation mark inside and say me the following error message if I pass the mouse over the icons:
schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context-3.0.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>.
But if I run on server my project is run well and work right
An other strange thing is that if I do a clean of my project this error disappear and appear again when STS end the validation process of my project (but if I run my project on server it still work well)...could be some STS settings? something about validation process?
Tnx
Andrea