Re: Help with deploying multiple .WAR files in Tomcat
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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help with deploying multiple .WAR files in Tomcat
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 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 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 >
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 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
Re: Error during startup
在 2022年8月4日星期四,Mohan T 写道: > Hi, > > Thanks for the response. > > How to identify the "grant" section > > Below is the contents of the file. > > Quote > > // Licensed to the Apache Softwarse Foundation (ASF) under one or more > // contributor license agreements. See the NOTICE file distributed with > // this work for additional information regarding copyright ownership. > // The ASF licenses this file to You under the Apache License, Version 2.0 > // (the "License"); you may not use this file except in compliance with > // the License. You may obtain a copy of the License at > // > // http://www.apache.org/licenses/LICENSE-2.0 > // > // Unless required by applicable law or agreed to in writing, software > // distributed under the License is distributed on an "AS IS" BASIS, > // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > // See the License for the specific language governing permissions and > // limitations under the License. > > // > > // catalina.policy - Security Policy Permissions for Tomcat > // > // This file contains a default set of security policies to be enforced > (by the > // JVM) when Catalina is executed with the "-security" option. In addition > // to the permissions granted here, the following additional permissions > are > // granted to each web application: > // > // * Read access to the web application's document root directory > // * Read, write and delete access to the web application's working > directory > // > > > > // == SYSTEM CODE PERMISSIONS == > === > > > // These permissions apply to javac > grant codeBase "file:${java.home}/lib/-" { > permission java.security.AllPermission; > }; > > // These permissions apply to all shared system extensions > grant codeBase "file:${java.home}/jre/lib/ext/-" { > permission java.security.AllPermission; > }; > > // These permissions apply to javac when ${java.home] points at > $JAVA_HOME/jre > grant codeBase "file:${java.home}/../lib/-" { > permission java.security.AllPermission; > }; > > // These permissions apply to all shared system extensions when > // ${java.home} points at $JAVA_HOME/jre > grant codeBase "file:${java.home}/lib/ext/-" { > permission java.security.AllPermission; > }; > > > // == CATALINA CODE PERMISSIONS == > = > grant codeBase "file:/home/ilas/rvwhome_tech/-" { >// permission java.security.AllPermission; > permission java.io.FilePermission "/home/ilas/rvwhome_tech/-", > "read,write"; > permission java.io.FilePermission > "/home/ilas/rvwhome_tech/RVWJAdmin.conf", > "read,write"; > permission java.io.FilePermission "/home/ilas/rvwhome_tech/ > ExportExcel/GridExport12.xlsm", "read,write"; > permission java.io.FilePermission > "/home/ilas/rvwhome_tech/config/cache.ccf", > "read,write"; > permission java.io.FilePermission "<>","read"; > > }; > > grant codeBase "file:/home/ilas/rvwhome_tech/ExportExcel/-"{ > //permission java.security.AllPermission; > permission java.io.FilePermission "/home/ilas/rvwhome_tech/ > ExportExcel/GridExport12.xlsm", "read,write"; > }; > > > > > > > > > > > > // These permissions apply to the daemon code > grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { > permission java.security.AllPermission; > }; > > // These permissions apply to the logging API > // Note: If tomcat-juli.jar is in ${catalina.base} and not in > ${catalina.home}, > // update this section accordingly. > // grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..} > grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { > permission java.io.FilePermission > > "${java.home}${file.separator}lib${file.separator}logging.properties", > "read"; > > permission java.io.FilePermission > > "${catalina.base}${file.separator}conf${file.separator}logging.properties", > "read"; > permission java.io.FilePermission > "${catalina.base}${file.separator}logs", "read, write"; > permission java.io.FilePermission > "${catalina.base}${file.separator}logs${file.separator}*", > "read, write, delete"; > > permission java.lang.RuntimePermission "shutdownHooks"; > permission java.lang.RuntimePermission "getClassLoader"; > permission java.lang.RuntimePermission "setContextClassLoader"; > > permission java.lang.management.ManagementPermission "monitor"; > > permission java.util.logging.LoggingPermission "control"; > > permission java.util.PropertyPermission > "java.util.logging.config.class", > "read"; > permission java.util.PropertyPermission > "java.util.logging.config.file", > "read"; > permission