org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory)

Spring JIRA | Alexander Veit | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    FileSystemXmlApplicationContext modifies the given path making it relative instead of absolute. {code:title=test.groovy} import org.springframework.context.support.FileSystemXmlApplicationContext new FileSystemXmlApplicationContext("/.mntpts/test/test.xml") {code} Fails with {noformat} Caught: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:251) 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:129) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84) at test.run(test.groovy:4) Caused by: java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:115) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330) ... 13 more {noformat}

    Spring JIRA | 1 year ago | Alexander Veit
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory)
  2. 0

    FileSystemXmlApplicationContext modifies the given path making it relative instead of absolute. {code:title=test.groovy} import org.springframework.context.support.FileSystemXmlApplicationContext new FileSystemXmlApplicationContext("/.mntpts/test/test.xml") {code} Fails with {noformat} Caught: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:251) 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:129) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84) at test.run(test.groovy:4) Caused by: java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:115) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330) ... 13 more {noformat}

    Spring JIRA | 1 year ago | Alexander Veit
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/tmp/.mntpts/test/test.xml]; nested exception is java.io.FileNotFoundException: .mntpts/test/test.xml (No such file or directory)

    Root Cause Analysis

    1. java.io.FileNotFoundException

      .mntpts/test/test.xml (No such file or directory)

      at org.springframework.core.io.FileSystemResource.getInputStream()
    2. Spring Core
      FileSystemResource.getInputStream
      1. org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:115)
      1 frame
    3. Spring Beans
      AbstractBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330)
      2. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
      3. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
      4. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
      5. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
      6. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:251)
      6 frames
    4. Spring Context
      FileSystemXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
      2. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
      3. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
      4. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
      5. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
      6. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
      7. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
      7 frames
    5. Unknown
      test.run
      1. test.run(test.groovy:4)
      1 frame