org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Protagonist
, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist
via Stack Overflow by Gladiator9
, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/resthttpurl.properties]
via Server Fault by zkristic
, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: /home/user/my/property/file.properties (Permission denied)
via Stack Overflow by Andrew K.
, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: property_placeholder\database.properties (The system cannot find the path specified)
via Stack Overflow by sekh
, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: ${CARBON_HOME}/repository/conf/hardstep/abcd.properties (No such file or directory)
via manning.com by Unknown author, 1 year ago
Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [spring/environment.properties] cannot be opened because it does not exist
java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
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.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:142)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:162)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Users with the same issue

4 times, 6 days ago
83 times, 4 weeks ago
3 times, 1 month ago
75 times, 1 month ago
Once, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.