title: FileNotFound exception when trying to get File from resource
body: <p>I cannot generate myJasperReports.jasper file because its throwing a <code>FileNotFoundException</code> while trying to read the file and create the report. I am using jasper-reports 3.7.5 and annotation-based Spring. Can someone tell what the problem might be?</p>
  
  <p>In web.xml file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="myReportTemplate" class="org.springframework.core.io.ClassPathResource"&gt;
      &lt;constructor-arg value="mypackage/reports/jasper/template/SampleJasper.jasper"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>This is the stacktrace:</p>
  
  <pre><code>[ERROR] java.io.FileNotFoundException: class path resource [mypackage/reports/jasper/template/SampleJasper.jasper] cannot be resolved to URL because it does not exist
  [ERROR] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:179)
  [ERROR] at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:48)
  [ERROR] at mypackage/reports.ReportsServiceImpl.prepareChart(ReportsServiceImpl.java:93)
  [ERROR]
  </code></pre>
  
  <p>The Plugin I'm using in pom.xml file</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;exploded&lt;/goal&gt;
            &lt;/goals&gt;
       &lt;/execution&gt;
     &lt;/executions&gt;
     &lt;configuration&gt;
       &lt;webappDirectory&gt;${webappDirectory}&lt;/webappDirectory&gt;
     &lt;/configuration&gt;
   &lt;/plugin&gt;
  
   &lt;plugin&gt;
     &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
     &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
     &lt;configuration&gt;
       &lt;outputDirectory&gt;${project.build.directory}/jasper&lt;/outputDirectory&gt;
     &lt;/configuration&gt;
     &lt;executions&gt;
       &lt;execution&gt;
         &lt;goals&gt;
           &lt;goal&gt;compile-reports&lt;/goal&gt;
         &lt;/goals&gt;
       &lt;/execution&gt;
     &lt;/executions&gt;
     &lt;dependencies&gt;
       &lt;dependency&gt;
         &lt;groupId&gt;jasperreports&lt;/groupId&gt;
         &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
         &lt;version&gt;2.0.5&lt;/version&gt;
       &lt;/dependency&gt;
     &lt;/dependencies&gt; 
  &lt;/plugin&gt;
  </code></pre>