Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. Thread.run() has thrown a BeanDefinitionStoreException
    Java Runtime
    12
    1
    0
  2. ServletContext unable to load Spring Beans
    Spring Beans
    48
    6
    3

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/classes/conf/security-applicationContext.xml]
2 matching frames hidden
org.springframework.beans.factory.BeanDefinitionStoreException: 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]
    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)
18 frames hidden

Solution

rahsan4 months ago

The two relevant solutions to this problem are:

If you are using bean definitions xml file you did not provide the relative path to the bean definitions xml file while creating ApplicationContext. If you are using annotations, in that case there is no bean definitions file altogether, it is more likely that your package scope in component scanning annotations like @ComponentScan is pointing to the wrong package.

External results for this pattern (10)

  1. mouezavia GitHub5 months ago
    IOException parsing XML document from ServletContext resource [/WEB-INF/servlet-context.xml]; nested exception is java.io.FileNotFoundException: 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