org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file=/var/www/html/tcserver/pivotal-tc-server-standard-3.0.3.RELEASE/login_accept/conf/logging.properties] cannot be resolved to URL because it does not exist


Solutions on the web19821

Solution icon of github
Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file=/var/www

Solution icon of github
Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file="E:/software/apache-tomcat-8.5.9/conf/logging.properties"] cannot be resolved to URL because it does not exist

Solution icon of googlegroups
Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file="D:/tomcat-8.5.11/conf/logging.properties"] cannot be resolved to URL because it does not exist

Solution icon of coderanch
via Coderanch by santhosh kumar vk, 7 months ago
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/employee-servlet.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [hibernate.cfg.xml] cannot be resolved to URL because it does not exist

Solution icon of web
via sql.ru by Unknown author, 1 year ago
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/data.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [hibernate.cfg.xml] cannot be resolved to URL because it does not exist

Solution icon of web
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [Hibernate.cfg.xml] cannot be resolved to URL because it does not exist

Solution icon of web
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [hibernate.cfg.xml] cannot be resolved to URL because it does not exist

Solution icon of stackoverflow
via Stack Overflow by jonney
, 1 year ago
Error creating bean with name 'mySessionFactory' defined in URL [file:war/WEB-INF/datasource-config.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [hibernate.cfg.xml] cannot be resolved to URL because it does not exist

Solution icon of github
via GitHub by vinitkhandagle
, 1 year ago
Error creating bean with name 'log4jConfigurer': Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [log4j.properties] cannot be resolved to URL because it does not exist

Solution icon of github
Error creating bean with name 'log4jConfigurer': Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [log4j.properties] cannot be resolved to URL because it does not exist

Stack trace

  • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file=/var/www/html/tcserver/pivotal-tc-server-standard-3.0.3.RELEASE/login_accept/conf/logging.properties] cannot be resolved to URL because it does not exist at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1581)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:359)[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:176)[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.cloud.context.scope.refresh.RefreshScope.start(RefreshScope.java:121)[spring-cloud-context-1.1.6.RELEASE.jar:1.1.6.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497)[?:1.8.0_45] at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:253)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:174)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:137)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:337)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5151)[catalina.jar:8.0.20.B] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:8.0.20.B] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)[catalina.jar:8.0.20.B] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)[catalina.jar:8.0.20.B] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)[catalina.jar:8.0.20.B] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)[catalina.jar:8.0.20.B] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701)[catalina.jar:8.0.20.B] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[?:1.8.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_45] at java.lang.Thread.run(Thread.java:745)[?:1.8.0_45] Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file=/var/www/html/tcserver/pivotal-tc-server-standard-3.0.3.RELEASE/login_accept/conf/logging.properties] cannot be resolved to URL because it does not exist at com.google.common.base.Throwables.propagate(Throwables.java:240)[guava-20.0.jar:?] at org.apereo.cas.web.report.LoggingConfigController.initialize(LoggingConfigController.java:86)[cas-server-support-reports-5.1.0-RC2-SNAPSHOT.jar:5.1.0-RC2-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497)[?:1.8.0_45] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 45 more Caused by: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file=/var/www/html/tcserver/pivotal-tc-server-standard-3.0.3.RELEASE/login_accept/conf/logging.properties] cannot be resolved to URL because it does not exist at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.core.io.AbstractResource.getURI(AbstractResource.java:99)[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.apereo.cas.web.report.LoggingConfigController.initialize(LoggingConfigController.java:82)[cas-server-support-reports-5.1.0-RC2-SNAPSHOT.jar:5.1.0-RC2-SNAPSHOT] ... 52 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

24 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago