Incorrect resource mapping resulting in FileNotFoundException

java.io.FileNotFoundException
Javadoc
at org.springframework.web.context.support.ServletContextResource.getInputStream
(source)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
(source)

Typical Exception Messages

  1. IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
  2. Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
  3. Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]
  4. IOException parsing XML document from ServletContext resource [/WEB-INF/dispatcherServlet-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/dispatcherServlet-servlet.xml]
  5. IOException parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]
  6. IOException parsing XML document from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]
  7. IOException parsing XML document from ServletContext resource [/WEB-INF/spring-dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring-dispatcher-servlet.xml]
  8. IOException parsing XML document from ServletContext resource [/<NONE>]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/<NONE>]
  9. IOException parsing XML document from ServletContext resource [/classPath*:Application.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classPath*:Application.xml]
  10. IOException parsing XML document from ServletContext resource [/WEB-INF/classes/conf/security-applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/classes/conf/security-applicationContext.xml]

Origin

ServletContextResource.getInputStream() has thrown a FileNotFoundException

java.io.FileNotFoundException
org.springframework.web.context.support.ServletContextResource.getInputStream
129Web pages

Similar

Specific cases

Solution

rahsan, 4 months ago

Ensure the resource that cannot be opened is properly mapped in your configuration file(web.xml, app-config.xml, etc..). Check this for farther clarification

External results for this pattern (99)

  1. mouezavia GitHub5 months ago
    Could not open ServletContext resource [/WEB-INF/servlet-context.xml]
    Show stack trace
  2. IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    Show stack trace
  3. sachwuvia GitHub5 months ago
    IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    Show stack trace
  4. Unknown authorvia algaworks.com5 months ago
    IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    Show stack trace
  5. gmeiner.mvia Stack Overflow5 months ago
    Servlet.init() for servlet [dispatcherServlet] threw exception
    Show stack trace
  6. munnavia Stack Overflow5 months ago
    IOException parsing XML document from ServletContext resource [/WEB-INF/xfire-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xfire-servlet.xml]
    Show stack trace
  7. Sam Jonesvia Stack Overflow5 months ago
    IOException parsing XML document from ServletContext resource [/<package name redacted>.TctWebApplication ]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/<package name redacted>.TctWebApplication]
    Show stack trace
  8. Unknown authorvia bccn.net5 months ago
    IOException parsing XML document from ServletContext resource [/classPath*:Application.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classPath*:Application.xml]
    Show stack trace
  9. Unknown authorvia bccn.net5 months ago
    IOException parsing XML document from ServletContext resource [/classPath*:Application.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classPath*:Application.xml]
    Show stack trace
  10. Andrew Onischukvia Apache's JIRA Issue Tracker5 months ago
    IOException parsing XML document from ServletContext resource [/WEB-INF/classes/conf/security-applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/classes/conf/security-applicationContext.xml]
    Show stack trace