title: Get error with Tomcat 8: Illegal access: this web application instance has been stopped already
body: <p>I'm trying to deploy my ROOT.WAR on my server.</p>
  
  <p>My server is running centos 7 (It's an amazon EC2 - free tier)
  My ROOT.war works OK on my local macbook but doesn't work on my remote server</p>
  
  <p>My server status:</p>
  
  <ul>
  <li>Tomcat 8.5.8</li>
  <li>Java :openjdk version "1.8.0_111"
  OpenJDK Runtime Environment (build 1.8.0_111-b15)
  OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)</li>
  </ul>
  
  <p>This is content of catalina.2016-11-19.log:</p>
  
  <pre><code>19-Nov-2016 07:48:30.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.8
  19-Nov-2016 07:48:30.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 3 2016 21:14:13 UTC
  19-Nov-2016 07:48:30.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.8.0
  19-Nov-2016 07:48:30.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
  19-Nov-2016 07:48:30.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-327.10.1.el7.x86_64
  19-Nov-2016 07:48:30.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.el7_2.x86_64/jre
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_111-b15
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
  19-Nov-2016 07:48:30.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dapp_conf_dir=/home/centos/Ringtones
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
  19-Nov-2016 07:48:30.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
  19-Nov-2016 07:48:30.391 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
  19-Nov-2016 07:48:30.391 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
  19-Nov-2016 07:48:30.511 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
  19-Nov-2016 07:48:30.536 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  19-Nov-2016 07:48:30.550 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
  19-Nov-2016 07:48:30.551 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  19-Nov-2016 07:48:30.564 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 815 ms
  19-Nov-2016 07:48:30.598 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
  19-Nov-2016 07:48:30.598 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.8
  19-Nov-2016 07:48:30.663 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/ROOT.war
  19-Nov-2016 07:48:33.440 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  19-Nov-2016 07:48:35.951 SEVERE [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
  19-Nov-2016 07:48:35.961 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
  19-Nov-2016 07:48:36.034 INFO [vert.x-worker-thread-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [com.ntl.backend.vertx.CrawlerVerticle]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
   java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.ntl.backend.vertx.CrawlerVerticle]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
      at org.vertx.java.platform.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:106)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at org.vertx.java.platform.impl.java.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:55)
      at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1748)
      at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  
  19-Nov-2016 07:48:36.035 INFO [vert.x-worker-thread-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.vertx.java.platform.impl.ModuleClassLoader$LinkedHashSet]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
   java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.vertx.java.platform.impl.ModuleClassLoader$LinkedHashSet]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
      at org.vertx.java.platform.impl.ModuleClassLoader.getModuleGraph(ModuleClassLoader.java:161)
      at org.vertx.java.platform.impl.ModuleClassLoader.getModulesToWalk(ModuleClassLoader.java:153)
      at org.vertx.java.platform.impl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:119)
      at org.vertx.java.platform.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:108)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at org.vertx.java.platform.impl.java.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:55)
      at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1748)
      at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  
  19-Nov-2016 07:48:36.035 INFO [vert.x-worker-thread-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.vertx.java.platform.impl.DefaultPlatformManager$22]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
   java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.vertx.java.platform.impl.DefaultPlatformManager$22]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
      at org.vertx.java.platform.impl.DefaultPlatformManager.handleDeployFailure(DefaultPlatformManager.java:1788)
      at org.vertx.java.platform.impl.DefaultPlatformManager.access$2000(DefaultPlatformManager.java:57)
      at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1750)
      at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  
  19-Nov-2016 07:48:36.037 INFO [22] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.util.logging.LogRecord]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
   java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.util.logging.LogRecord]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
      at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
      at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
      at org.vertx.java.core.logging.impl.JULLogDelegate.log(JULLogDelegate.java:103)
      at org.vertx.java.core.logging.impl.JULLogDelegate.error(JULLogDelegate.java:59)
      at org.vertx.java.core.logging.Logger.error(Logger.java:72)
      at org.vertx.java.core.impl.DefaultContext.reportException(DefaultContext.java:86)
      at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:177)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  
  19-Nov-2016 07:48:36.038 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/webapps/ROOT.war has finished in 5,375 ms
  19-Nov-2016 07:48:36.053 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/docs
  19-Nov-2016 07:48:36.080 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/docs has finished in 26 ms
  19-Nov-2016 07:48:36.080 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/examples
  </code></pre>
  
  <p>I know that the probem here is <code>org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.util.logging.LogRecord]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.</code> but I tried many ways on STACKOVERFLOW but still not working :((</p>
  
  <p>Please help me!!!</p>