Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsContext initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1082179/#msg_1082179
I am new to Stardust. I have configured embedded Apache Tomcat and was to run my sample.
But today when I am starting embedded Tomcat server its giving me this error and after that deployment also fail.
Can you please help me what could be reason.
- Context initialization failed
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [carnot.properties] cannot be opened because it does not exist
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [carnot.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
... 21 more
Aug 08, 2013 12:55:20 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [carnot.properties] cannot be opened because it does not exist
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [carnot.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
... 21 more
It says cannot load 'carnot.properties', I think this file gets generated automatically. what could be the reason its not getting generated ?
Thanks.]]>Ravinderjit Singh2013-08-08T07:38:06-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1082373/#msg_1082373
carnot.properties must be located in the ipp-resources folder of your dynamic rad project. Please could you check if it is there!? If it is the case then clean the Tomcat work directory. You can do that easily with a right click on your Tomcat server in the Servers view.]]>Sven Rottstock2013-08-08T13:32:28-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084786/#msg_1084786
the most common cause for this error would be
- automatic build are not turned on and the project has not been built manually, hence the file has not been published to the bin folder and server.
- Unclean WTP publish: Sometimes the publish operation gets interrupted.
1. Stop the server
2. Make sure automatic build are turned on (Project - Build automatically)
3. Right-click on the server entry and select "Clean..." ("Clean Tomcat Work Directory" is another option that won't hurt either).
4. Now wait for the publish from scratch to complete and start the server again.
Does that help?
Best regards
Rob]]>Robert Emsbach2013-08-12T04:16:28-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084841/#msg_1084841
Thanks for your reply.
Yes, Build Automatically option is enabled.
carnot.properties file is there under ipp-resources.
I tried cleaning the server using 'Clean' and 'Clean Tomcat work directory', but it didn't help.
This happens for a particular project.
Ravinderjit]]>Ravinderjit Singh2013-08-12T06:11:29-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084846/#msg_1084846
after publishing please check the folder
[workspace]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\[project name]\WEB-INF\classes
Does it contain the carnot.properties file?
Best regards
Rob]]>Robert Emsbach2013-08-12T06:20:57-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084851/#msg_1084851
This looks very strange.
There is not classes folder here
[workspace]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\[project name]\WEB-INF\
Ravinderjit]]>Ravinderjit Singh2013-08-12T06:25:37-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084857/#msg_1084857
that means something basic is wrong with your project setup. The eclipse WTP plugin is not publishing your project correctly.
Do you have any build path or other errors in the project setup? What is your build target folder for compiled code?
Do you have the same issue when you create a fresh RAD project?
Rob
]]>Robert Emsbach2013-08-12T06:32:49-00:00Re: Context initialization failed
https://www.eclipse.org/forums/index.php/mv/msg/501315/1084883/#msg_1084883
There is no error in my project setup. I don't see any error in 'Problems' view.
I tried with fresh project, its working fine now.
Thanks for your help.