You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shakila Rajaiah <sr...@yahoo.com.INVALID> on 2022/08/04 19:21:14 UTC

Help with deploying multiple .WAR files in Tomcat

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  *****************************  

Re: Help with deploying multiple .WAR files in Tomcat

Posted by David Rush <da...@wyo.gov>.
We successfully deploy multiple webapps by simply dropping .war files into
the webapps directory all the time.  No problems here.  Just sharing my
perspective.

David

On Thu, Aug 4, 2022 at 4:10 PM James H. H. Lampert
<ja...@touchtonecorp.com.invalid> wrote:

> Multiple WAR files work fine for us. But we don't simply "drop [the WAR
> files] in the webapps folder (and for the most part, that *doesn't* work
> for us, even with *only one* webapp).
>
> We always deploy through the Manager webapp (which we always customize
> to increase the allowable WAR file size by an order of magnitude, every
> time we update somebody's Tomcat), and there are plenty of installations
> where we have multiple nearly-identical contexts based on completely
> identical WAR files (and note that another customization we make when
> installing Tomcat is to disable re-expansion of WAR files when Tomcat
> launches, since that would overwrite parameters manually inserted into
> the contexts after deployment).
>
> --
> JHHL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

-- 

E-Mail to and from me, in connection with the transaction 
of public 
business, is subject to the Wyoming Public Records 
Act and may be 
disclosed to third parties.

Re: Help with deploying multiple .WAR files in Tomcat

Posted by "James H. H. Lampert" <ja...@touchtonecorp.com.INVALID>.
Multiple WAR files work fine for us. But we don't simply "drop [the WAR 
files] in the webapps folder (and for the most part, that *doesn't* work 
for us, even with *only one* webapp).

We always deploy through the Manager webapp (which we always customize 
to increase the allowable WAR file size by an order of magnitude, every 
time we update somebody's Tomcat), and there are plenty of installations 
where we have multiple nearly-identical contexts based on completely 
identical WAR files (and note that another customization we make when 
installing Tomcat is to disable re-expansion of WAR files when Tomcat 
launches, since that would overwrite parameters manually inserted into 
the contexts after deployment).

--
JHHL

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Help with deploying multiple .WAR files in Tomcat

Posted by Shakila Rajaiah <sr...@yahoo.com.INVALID>.
Thank you - let me look into this.Shakila.
Shakila Rajaiah  *****************************  e-mail: srajaiah@yahoo.com  
 

    On Thursday, August 4, 2022 at 05:49:02 PM EDT, Noelette Stout <no...@isu.edu> wrote:  
 
 It looks like you have multiple locations/instances of the same jar file (jasper-el.jar by the looks of the error message). This is typically included with tomcat. Are you also including a version with your application?
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.  


On Thu, Aug 4, 2022 at 1:21 PM Shakila Rajaiah <sr...@yahoo.com.invalid> wrote:

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  *****************************  



-- 
Noelette StoutITS Enterprise Applications - Senior Application AdministratorIdaho State University 
E-mail: stounoel "at" isu "dot" edu  
Desk: 208-282-2554

  

Re: Help with deploying multiple .WAR files in Tomcat

Posted by Noelette Stout <no...@isu.edu>.
It looks like you have multiple locations/instances of the same jar file
(jasper-el.jar by the looks of the error message). This is typically
included with tomcat. Are you also including a version with your
application?

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.


On Thu, Aug 4, 2022 at 1:21 PM Shakila Rajaiah <sr...@yahoo.com.invalid>
wrote:

> 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  *****************************
>


-- 
Noelette Stout
ITS Enterprise Applications - Senior Application Administrator
Idaho State University
E-mail: stounoel "at" isu "dot" edu
Desk: 208-282-2554

Re: Help with deploying multiple .WAR files in Tomcat

Posted by Konstantin Kolinko <kn...@gmail.com>.
чт, 4 авг. 2022 г. в 22:21, Shakila Rajaiah <sr...@yahoo.com.invalid>:
>
> 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

1. This mailing list expects e-mails to be in plain text. As such, any
link that you might have had above, and any yellow highlighting of the
text are lost.

 > 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.
>
> [...]

> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\apache-tomcat-9.0.46\webapps\Test2-0.0.1-SNAPSHOT.war]

2. The above name of a war file means that it will be unpacked as
"Test2-0.0.1-SNAPSHOT". Thus the root URL of your web application will
look like the following:

http://localhost:8080/Test2-0.0.1-SNAPSHOT/

If that is what you are expecting, then OK.

See
https://tomcat.apache.org/tomcat-9.0-doc/config/context.html#Naming

> 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.

3.The above message mentions the Servlet Specification.

Links to different versions of the specification may be found here:

https://cwiki.apache.org/confluence/display/TOMCAT/Specifications


4. Regarding "org_apache_jasper_el".

It looks like your war includes a library that provides implementation
of EL (expression language, as used in JSPs).

An implementation of EL is provided by Tomcat. As well as
implementations of the Servlet, JSP and WebSocket APIs.

If your pom.xml file references such dependencies, annotate them with
"<scope>provided</scope>", so that they are not packed into a war
file.

https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org