{"action":"closed","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13553","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13553/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13553/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13553/events","html_url":"https://github.com/spring-projects/spring-boot/issues/13553","id":334864034,"node_id":"MDU6SXNzdWUzMzQ4NjQwMzQ=","number":13553,"title":"FileNotFoundException while file exists","user":{"login":"bahrmichael","id":1830132,"node_id":"MDQ6VXNlcjE4MzAxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1830132?v=4","gravatar_id":"","url":"https://api.github.com/users/bahrmichael","html_url":"https://github.com/bahrmichael","followers_url":"https://api.github.com/users/bahrmichael/followers","following_url":"https://api.github.com/users/bahrmichael/following{/other_user}","gists_url":"https://api.github.com/users/bahrmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/bahrmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahrmichael/subscriptions","organizations_url":"https://api.github.com/users/bahrmichael/orgs","repos_url":"https://api.github.com/users/bahrmichael/repos","events_url":"https://api.github.com/users/bahrmichael/events{/privacy}","received_events_url":"https://api.github.com/users/bahrmichael/received_events","type":"User","site_admin":false},"labels":[{"id":97741072,"node_id":"MDU6TGFiZWw5Nzc0MTA3Mg==","url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-feedback","name":"status: waiting-for-feedback","color":"fef2c0","default":false},{"id":293438798,"node_id":"MDU6TGFiZWwyOTM0Mzg3OTg=","url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-triage","name":"status: waiting-for-triage","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-22T12:41:32Z","updated_at":"2018-06-22T14:37:03Z","closed_at":"2018-06-22T14:37:03Z","author_association":"NONE","body":"**Bug**\r\n\r\nSpring fails to build the configuration context due to a `FileNotFoundException`. This file however is created a couple seconds before, as shown by the File Log below.\r\n\r\nFile created: 14:14:42\r\nFileNotFoundException: 14:15:07\r\n\r\nTomcat version: 8.0.49\r\nSpring Boot version: 1.5.12.RELEASE\r\n\r\nWe're not using the embedded tomcat, but a provided one via the cargo-maven2-plugin.\r\n\r\nI am trying to understand why this is the case and what could be done to read the file.\r\n\r\n```\r\n    22-06 14:15:07,558 [localhost-startStop-1][] ERROR org.springframework.boot.SpringApplication    (771) - Application startup failed\r\n    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.vw.mbbc.registrationserver.RegistrationserverWebappApplication]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/path/to/myapp.properties]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:183) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE]\r\n    \tat org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) [spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302) [catalina.jar:8.0.49]\r\n    \tat com.vw.mbbc.registrationserver.access.EnhancedContext.startInternal(EnhancedContext.java:133) [registration-tomcat.jar:?]\r\n    \tat org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.49]\r\n    \tat org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) [catalina.jar:8.0.49]\r\n    \tat org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) [catalina.jar:8.0.49]\r\n    \tat org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.49]\r\n    \tat org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:974) [catalina.jar:8.0.49]\r\n    \tat org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850) [catalina.jar:8.0.49]\r\n    \tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]\r\n    \tat java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]\r\n    \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]\r\n    \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]\r\n    \tat java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]\r\n    Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/path/to/myapp.properties]\r\n    \tat org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:154) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:72) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.PropertiesLoaderUtils.loadProperties(PropertiesLoaderUtils.java:58) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.ResourcePropertySource.<init>(ResourcePropertySource.java:65) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.core.io.support.DefaultPropertySourceFactory.createPropertySource(DefaultPropertySourceFactory.java:36) ~[spring-core-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.processPropertySource(ConfigurationClassParser.java:442) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:273) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:247) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:294) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:247) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:200) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \tat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:169) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]\r\n    \t... 27 more\r\n```\r\n\r\nFile Log\r\n\r\n```\r\n    Fri Jun 22 14:14:41 CEST 2018\r\n    ls: /path/to/myapp.properties: No such file or directory\r\n    Fri Jun 22 14:14:42 CEST 2018\r\n    -rw-r--r--  1 michaelbahr  staff  157 Jun 22 14:14:42 2018 /path/to/myapp.properties\r\n    Fri Jun 22 14:14:43 CEST 2018\r\n    -rw-r--r--  1 michaelbahr  staff  157 Jun 22 14:14:43 2018 /path/to/myapp.properties\r\n```\r\n\r\nPom Excerpt\r\n\r\n```\r\n<tomcat.version>8.0.49</tomcat.version>\r\n...\r\n        <dependency>\r\n            <groupId>org.springframework.boot</groupId>\r\n            <artifactId>spring-boot-starter-jersey</artifactId>\r\n            <exclusions>\r\n                <exclusion>\r\n                    <groupId>org.springframework.boot</groupId>\r\n                    <artifactId>spring-boot-starter-tomcat</artifactId>\r\n                </exclusion>\r\n            </exclusions>\r\n        </dependency>\r\n\r\n...\r\n\r\n            <dependency>\r\n                <groupId>org.apache.tomcat</groupId>\r\n                <artifactId>tomcat-catalina</artifactId>\r\n                <version>${tomcat.version}</version>\r\n                <scope>provided</scope>\r\n            </dependency>\r\n            <dependency>\r\n                <groupId>org.apache.tomcat</groupId>\r\n                <artifactId>tomcat-coyote</artifactId>\r\n                <version>${tomcat.version}</version>\r\n                <scope>provided</scope>\r\n            </dependency>\r\n```\r\n\r\nPaths are absolute and were reduced for privacy, but do match 100%.\r\n\r\nPlease let me know what further information I can provide to investigate. I'm not able to provide a reproducer."}}
{"actor":{"display_login":"philwebb"}}