Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » Context initialization failed
Context initialization failed [message #1082179] Thu, 08 August 2013 07:38 Go to next message
Ravinderjit Singh is currently offline Ravinderjit Singh
Messages: 22
Registered: August 2013
Junior Member
Hi,

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.

[Updated on: Mon, 12 August 2013 06:18]

Report message to a moderator

Re: Context initialization failed [message #1082373 is a reply to message #1082179] Thu, 08 August 2013 13:32 Go to previous messageGo to next message
Sven Rottstock is currently offline Sven Rottstock
Messages: 25
Registered: December 2012
Junior Member
The file 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.
Re: Context initialization failed [message #1084786 is a reply to message #1082373] Mon, 12 August 2013 04:16 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert Emsbach
Messages: 119
Registered: October 2011
Location: Singapore
Senior Member

Ravi,

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
Re: Context initialization failed [message #1084841 is a reply to message #1084786] Mon, 12 August 2013 06:11 Go to previous messageGo to next message
Ravinderjit Singh is currently offline Ravinderjit Singh
Messages: 22
Registered: August 2013
Junior Member
Hi Sven/Rob,

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
Re: Context initialization failed [message #1084846 is a reply to message #1084841] Mon, 12 August 2013 06:20 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert Emsbach
Messages: 119
Registered: October 2011
Location: Singapore
Senior Member

Ravinderjit,

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
Re: Context initialization failed [message #1084851 is a reply to message #1084846] Mon, 12 August 2013 06:25 Go to previous messageGo to next message
Ravinderjit Singh is currently offline Ravinderjit Singh
Messages: 22
Registered: August 2013
Junior Member
Rob,

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
Re: Context initialization failed [message #1084857 is a reply to message #1084846] Mon, 12 August 2013 06:32 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert Emsbach
Messages: 119
Registered: October 2011
Location: Singapore
Senior Member

Ravinderjit,

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
Re: Context initialization failed [message #1084883 is a reply to message #1084857] Mon, 12 August 2013 07:13 Go to previous message
Ravinderjit Singh is currently offline Ravinderjit Singh
Messages: 22
Registered: August 2013
Junior Member
Rob,

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.

Ravinderjit
Previous Topic:Can't see my post
Next Topic:Using Form(s) in a Portal View
Goto Forum:
  


Current Time: Thu Oct 02 14:39:01 GMT 2014

Powered by FUDForum. Page generated in 0.01886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software