title: nested exception is org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 5; cvc-elt.1: Cannot find the declaration of element 'beans'
body: <p>I am getting error while running the spring batch application,in the application I have jar(<code>MasterDataConversionTool-1.0-SNAPSHOT-jar-with-dependencies.jar</code>) with all dependencies jar required to run the application like spring batch.jar etc bundled with it.</p>
  
  <p>Seems there could be some problems while reading schema <code>'http://www.springframework.org/schema/beans/spring-beans-4.2.xsd'</code> Even I have unziped the dependency jar and I could find <code>spring-beans-4.2.xsd</code> exits.</p>
  
  <p>Here I run the application </p>
  
  <pre><code>java -jar MasterDataConversionTool-1.0-SNAPSHOT-jar-with-dependencies.jar java Main -DBHOST ny.svr.us.nyedu.net -DBPORT 1530 -DBSID ANYEDU01D -DBUSER NY50942  -DBPWD XXXX -OUT C:\NYEDU -WSHOST nyedu
  All Config are correct:true
  00:53:09.014 [main] INFO  com.nyedu.sdp.md.tool.main.Main - All Config are correct:true
  00:53:09.021 [main] INFO  com.nyedu.sdp.md.tool.main.Main - ** STARTING JOB **
  Sep 28, 2016 12:53:09 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from class path resource [com/nyedu/sdp/md/tool/applicationContext.xml]
  Sep 28, 2016 12:53:30 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader warning
  WARNING: Ignored XML validation warning
  org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 5; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-4.2.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not &lt;xsd:schema&gt;.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:433)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:347)
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4128)
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4119)
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2463)
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2167)
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:562)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:588)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2448)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1767)
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:602)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3065)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:881)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
          at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237)
          at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
          at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:252)
          at org.springframework.context.support.GenericXmlApplicationContext.load(GenericXmlApplicationContext.java:124)
          at org.springframework.context.support.GenericXmlApplicationContext.&lt;init&gt;(GenericXmlApplicationContext.java:69)
          at com.nyedu.sdp.md.tool.main.Main.main(Main.java:88)
  00:53:30.334 [main] ERROR com.nyedu.sdp.md.tool.main.Main - ** EXCEPTION IN JOB **Line 11 in XML document from class path resource [com/nyedu/sdp/md/tool/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 5; cvc-elt.1: Cannot find the declaration of element 'beans'.
  </code></pre>
  
  <p>Here is the my spring context file where I have defined the name spaces.</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:context="http://www.springframework.org/schema/context"
         xmlns:p="http://www.springframework.org/schema/p"
           xmlns:batch="http://www.springframework.org/schema/batch"
           xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
        http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-3.0.xsd
        "&gt;
  …..
  …..
  ……
  &lt;/beans&gt;
  </code></pre>
  
  <p>What could be the problems kindly help.</p>