title: I'm getting FileNotFoundException while running a war
body: <p>Here is a code line, which I use to access xml file.</p>
  
  <pre><code>Contacts contactsEntity = (Contacts) um.unmarshal(new FileReader(new File(classLoader.getResource("Contacts.xml").getFile())));
  </code></pre>
  
  <p>Here is what I get while running a war:</p>
  
  <pre><code>java.io.FileNotFoundException: file:\D:\apache-tomcat-8.0.50\webapps\pb\WEB-INF\lib\phonebook-server-0.0.1-SNAPSHOT.jar!\Contacts.xml (The filename, directory name, or volume label syntax is incorrect)
  </code></pre>
  
  <p>P.S. It is 100% not an issue with file access, because I made a simple project which generates JAXB classes, unmarshals the same xml from resources folder and everything works fine.</p>
  
  <p>Here is a structure of project:</p>
  
  <p><a href="https://i.stack.imgur.com/ScPEn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ScPEn.png" alt="enter image description here"></a></p>