简体   繁体   中英

How to Run multiple dependent applications from Tomcat locally by deploying their war?

I have 4 war files of 4 Grails and Java applications which I want to deploy on Apache Tomcat 9 locally. If one of these applications need to run first and then others, how should I deploy them? Currently I have created 4 folders in tomcat directory and pasted the respective wars. When I start tomcat it picks up all one by one to deploy but I don't know if it should pick them up in sequence for proper deployment because I am getting errors in log. How should I deploy them?

SEVERE [localhost-startStop-1] 

org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null object

Another in log

[localhost-startStop-1] 

org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 03-Jan-2017 01:11:04.950 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/(app name)] startup failed due to previous errors

A DevOps approach using Jenkins might solve your issue.

You can build and/or deploy your applications in a prescribed order with FreeStyle jobs. We do this routinely off code commits in our CI/CD environment in AWS.

No reason this could not be done in a non-AWS environment also.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM