title: Getting error message with spring "cvc-elt.1: Cannot find the declaration of element 'beans'."
body: <p>I'm trying to set up a simple spring application and I'm getting the below exception. This is being run standalone in eclipse indigo.</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Line 2 in XML document from class path resource [context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
  org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
  </code></pre>
  
  <p>Here's the initial portion of my code:</p>
  
  <pre><code>public static void main(String[] args) {
  
          try {
  
              BeanFactory beanfactory = new ClassPathXmlApplicationContext(
                      "context.xml");
  
  
              FirstBean bean = (FirstBean) beanfactory.getBean("show");
  </code></pre>
  
  <p>Here's my context.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
  &lt;bean id="anotherBean" class="AnotherBean" /&gt;
  &lt;bean id="show" class="FirstBean"&gt;
  &lt;constructor-arg ref="anotherBean" /&gt;
  &lt;/bean&gt;
  &lt;bean id="populateFD" class="PopulateFactData"&gt;
  &lt;constructor-arg value="localhost" /&gt;
  &lt;constructor-arg value="3309" /&gt;
  &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>