title: nested exception is java.io.FileNotFoundException: class path resource [config/simpleJob.xml] cannot be opened because it does not exist
body: <p>I am developing a Spring Batch application which has a dependency added. This dependency has a spring.xml file. I am scanning this xml file.calling the mxl file values from main method and displaying the out put.</p>
  
  <p>I have added this xml file in root package  under config folder(src/main/java/config/simpleJob.xml) of my application. However I still see the exception listed below. Please can you anyone let me know what I am missing.and where i need to load the xml file in my application.</p>
  
  <p>main method </p>
  
  <pre><code>public class HelloWorldTasklet implements Tasklet{
  
  
  
      private String message;
  
      public void setMessage(String message) {
          this.message = message;
      }
  
   @Override
   public RepeatStatus execute(StepContribution contribution, ChunkContext context)
     throws Exception {
    System.out.println(message);
    return RepeatStatus.FINISHED;
   }
  
  }
  </code></pre>
  
  <p>project structure
  .SpringBatchSample
   |</p>
  
  <p>|<br>
   <code>-- src
  </code>-- test
           |-- java
           |   <code>-- com
           |</code>-- example
           |           <code>-- SpringBatchExample
           |</code>-- HelloWorldTasklet.java
           |-- resources
           |<br>
           |       `-- simpleJob.xml</p>
  
  <p>Anyone help me to resolve this problem.</p>
  
  <p>Thanks in Advance</p>
  
  <p>i tried many solution which posted in different site,but still im getting the same issues</p>
  
  <pre><code>SEVERE: Job Terminated in error: IOException parsing XML document from class path resource [resources/simpleJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [resources/simpleJob.xml] cannot be opened because it does not exist
  org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [resources/simpleJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [resources/simpleJob.xml] cannot be opened because it does not exist
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
      at org.springframework.batch.core.launch.support.CommandLineJobRunner.start(CommandLineJobRunner.java:290)
      at org.springframework.batch.core.launch.support.CommandLineJobRunner.main(CommandLineJobRunner.java:592)
  Caused by: java.io.FileNotFoundException: class path resource [resources/simpleJob.xml] cannot be opened because it does not exist
      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
      ... 14 more
  </code></pre>