java.io.FileNotFoundException: (The system cannot find the path specified)

Spring JIRA | Adam Hardy | 2 years ago
  1. 0

    This doesn't translate the #{systemEnvironment[]} scriptlet into the directory given in the system variable: <util:properties id="imapExtra" location="file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties" /> "systemEnvironment[..." causes a file not found IOException. But this does: <bean id="imapExtra" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="location" value="file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties" /> </bean> Here's the exception: 2014-11-28 15:14:42 INFO org.springframework.beans.factory.config.PropertiesFactoryBean.loadProperties():172 - Loading properties file from URL [file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties] java.io.FileNotFoundException: (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at java.io.FileInputStream.<init>(FileInputStream.java:101) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168) at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:143) at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98) at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175) at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156) at org.springframework.beans.factory.config.PropertiesFactoryBean.createProperties(PropertiesFactoryBean.java:102) at org.springframework.beans.factory.config.PropertiesFactoryBean.afterPropertiesSet(PropertiesFactoryBean.java:71) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564) ... 21 more

    Spring JIRA | 2 years ago | Adam Hardy
    java.io.FileNotFoundException: (The system cannot find the path specified)
  2. 0

    This doesn't translate the #{systemEnvironment[]} scriptlet into the directory given in the system variable: <util:properties id="imapExtra" location="file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties" /> "systemEnvironment[..." causes a file not found IOException. But this does: <bean id="imapExtra" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="location" value="file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties" /> </bean> Here's the exception: 2014-11-28 15:14:42 INFO org.springframework.beans.factory.config.PropertiesFactoryBean.loadProperties():172 - Loading properties file from URL [file:#{systemEnvironment['ECNETL_PROPS']}/imap-extra.properties] java.io.FileNotFoundException: (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at java.io.FileInputStream.<init>(FileInputStream.java:101) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168) at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:143) at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98) at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175) at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156) at org.springframework.beans.factory.config.PropertiesFactoryBean.createProperties(PropertiesFactoryBean.java:102) at org.springframework.beans.factory.config.PropertiesFactoryBean.afterPropertiesSet(PropertiesFactoryBean.java:71) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564) ... 21 more

    Spring JIRA | 2 years ago | Adam Hardy
    java.io.FileNotFoundException: (The system cannot find the path specified)
  3. 0

    How to run two services with two different contexts on one tomcat8

    Stack Overflow | 1 year ago | Sok Pomaranczowy
    org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: /conf.properties (No such file or directory)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can't load properties when starting use tomcat7 + eclipse (4.2)

    GitHub | 4 years ago | henryyan
    org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: /Users/henryyan/tmp/spring-mvc-showcase/src/main/webapp/WEB-INF/classes/application.properties (No such file or directory)
  6. 0

    OpenNMS - discuss - Re: Error In Deployment in Tomcat

    nabble.com | 1 year ago
    org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [daoContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoContext' defined in URL [jar:file:/C:/apache-tomcat-6.0.29/webapps/org.opennms.features.webapp-full-1.8.1/WEB-INF/lib/opennms-dao-1.8.1.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: ${opennms.home}\etc\model-importer.properties (The system cannot find the path specified)

  1. marcbouvierdav 2 times, last 3 months ago
  2. treefolk 1 times, last 2 weeks ago
  3. davidvanlaatum 1 times, last 3 weeks ago
  4. Andreas Häber 1 times, last 4 weeks ago
  5. kjhdofjosvs 1 times, last 1 month ago
7 more registered users
15 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    (The system cannot find the path specified)

    at java.io.FileInputStream.open()
  2. Java RT
    FileURLConnection.getInputStream
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:146)
    3. java.io.FileInputStream.<init>(FileInputStream.java:101)
    4. sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    5. sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    5 frames
  3. Spring Core
    PropertiesLoaderSupport.mergeProperties
    1. org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168)
    2. org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:143)
    3. org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98)
    4. org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175)
    5. org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156)
    5 frames
  4. Spring Beans
    AbstractAutowireCapableBeanFactory.initializeBean
    1. org.springframework.beans.factory.config.PropertiesFactoryBean.createProperties(PropertiesFactoryBean.java:102)
    2. org.springframework.beans.factory.config.PropertiesFactoryBean.afterPropertiesSet(PropertiesFactoryBean.java:71)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
    4 frames