Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMRS failure due to missing applicationContext-service.xml #215

Open
schuyler opened this issue Oct 1, 2019 · 0 comments
Open

OpenMRS failure due to missing applicationContext-service.xml #215

schuyler opened this issue Oct 1, 2019 · 0 comments

Comments

@schuyler
Copy link
Member

schuyler commented Oct 1, 2019

Automated integration tests on staging failed due to the following error displaying on the OpenMRS front page:

Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-service.xml] cannot be opened because it does not exist
org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-service.xml] cannot be opened because it does not exist
	at org.openmrs.web.WebDaemon.startOpenmrs(WebDaemon.java:64)
	at org.openmrs.web.Listener.contextInitialized(Listener.java:145)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5027)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5525)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-service.xml] cannot be opened because it does not exist
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:221)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-service.xml] cannot be opened because it does not exist
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:808)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:842)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:595)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:546)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:213)
	... 1 more
Caused by: java.io.FileNotFoundException: class path resource [applicationContext-service.xml] cannot be opened because it does not exist
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)

	... 15 more

Manually restarting the server resolved the problem.

See catalina.out for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant