Hello Tomcat users,
Can someone help me find the correct documentation to deploy more than one war
file on Tomcat server. The information available on the web is confusing.
I followed this instruction and dropped both test1.war and test2.war files in
the webapps folder. Test1.war seems to have deployed correctly. Howeevr I
received multiple error messages with deploying test2.war. The errors are
highlighted in yellow.Simply drop both war files into Tomcat's webapps folder.
That is all you need to do. By default, Tomcat expands ("explodes" some say)
each war (technically a zip file) into a folder and automatically deploys the
app for you. This happens on the fly if Tomcat is already running, or on
startup when you launch Tomcat.
and this is the error message that I received.
. ____ _ __ _ _/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ (
)\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / /
/=========|_|==============|___/=/_/_/_/:: Spring Boot ::
(v2.4.5)
022-08-02 14:47:48.459 INFO 1148 --- [ main]
c.c.d.p.app.Test1Application : Starting Test1Application v0.0.1-SNAPSHOT
using Java 1.8.0_291 on XXXX with PID 1148
(C:\apache-tomcat-9.0.46\webapps\citilink\WEB-INF\classes started by
sr46\bin)022-08-02 14:47:48.475 INFO 1148 --- [ main]
c.c.d.p.app.Test1Application : No active profile set, falling back to default
profiles: default022-08-02 14:47:51.319 INFO 1148 --- [ main]
w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
initialization completed in 2703 ms022-08-02 14:47:52.319 INFO 1148 --- [
main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing
ExecutorService 'applicationTaskExecutor'022-08-02 14:47:52.819 INFO 1148 ---
[ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing
ExecutorService 'taskScheduler'022-08-02 14:47:52.866 INFO 1148 --- [
main] c.c.d.p.app.Test1Application : Started Test1Application in 5.811
seconds (JVM running for 12.214)2-Aug-2022 14:47:52.897 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application
archive [C:\apache-tomcat-9.0.46\webapps\test1.war] has finished in [9,766]
ms2-Aug-2022 14:47:52.897 INFO [main]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [C:\apache-tomcat-9.0.46\webapps\Test2-0.0.1-SNAPSHOT.war]2-Aug-2022
14:47:53.116 SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR
Error deploying web application archive
[C:\apache-tomcat-9.0.46\webapps\Test2-0.0.1-SNAPSHOT.war]
java.lang.IllegalStateException: Error starting child at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:692)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown
Source) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown
Source) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
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:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused
by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Test2-0.0.1-SNAPSHOT]]
at
org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
... 37 more Caused by: java.lang.IllegalArgumentException:
More than one fragment with the name [org_apache_jasper_el] was found. This is
not legal with relative ordering. See section 8.2.2 2c of the Servlet
specification for details. Consider using absolute ordering. at
org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2260)
at
org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2218)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1294)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:986)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 38 more
Would appreciate any help on this,
ThanksShakila *****************************