3

I have Spring 3.0.5 version and the solutions 1 and 2 are not working for me. Even though i have errors in XML my simple application is running successfully. I followed a website where they used spring 3.0.1 does this mean any? And the errors i got are

cvc-elt.1: Cannot find the declaration of element 'beans' 

and

Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-3.0.xsd).  For more information, right click on the message in the Problems View and select "Show Details..."

My config is named simple-servlet.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: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-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd">


    <context:component-scan base-package="com.kiran.mvcdemo" />

    <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/" />
        <property name="suffix" value=".jsp" />
    </bean>
</beans> 
Community
  • 1
  • 1
  • `Referenced file contains bla bla...` looks like this is Eclipse message? What Eclipse toolchain are you ussing? Do you have [Spring plugin](http://www.springsource.org/sts) installed? Config looks good for me. These namespaces come in Spring JARs and IDE should automatically find them. – madhead Aug 29 '13 at 00:44
  • i dont know the technical term tool chaining but my eclipse version is eclipse kepler. how to check presence of any plugin in eclipse if it is like help-->about eclipse i have bunch of options non specify about spring. –  Aug 29 '13 at 00:53
  • A set of tools. For example I use Springsource Tool Suite which comes with Spring plugins out of the box. Try installing plugin from the link I gave - the error should gone. – madhead Aug 29 '13 at 01:02
  • yes its downloading respected files. i donno the size of that plugin, if you know could you please tell me the size, reason is my internet speed is slow and i want to know how much time i have to wait to complete the download so that i will continue my studies on spring. –  Aug 29 '13 at 01:12
  • Do not know exactly, but it is pretty big. Plugin can be up to 150 Mb, I think. – madhead Aug 29 '13 at 01:19
  • yes completed download but it has'nt solved my problem –  Aug 29 '13 at 02:07
  • it didn't worked with the existing application but when i used Spring plugin and created a new Spring project and created a new xml with the xml contents and name which i have been getting error it did'nt show any errors. its just worked fine so i have to copy all my files to the currently created application. –  Aug 29 '13 at 02:35
  • use right version of xml schema in "spring-beans-3.0.xsd".try with2.5 or other right version u have. – Devendra Jan 06 '14 at 17:23

0 Answers0