Uploaded image for project: 'Apache Tomcat Maven Plugin'
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-276

Could not properly stop Tomcat when integration tests are failing

    XMLWordPrintableJSON

Details

    Description

      When running integration tests with the Maven Tomcat plugin 2.2 and if the tests are failing, Tomcat generates a nasty error while trying to be stopped.

      Everything is fine if the tests pass. Here is the stacktrace:

      ERROR: IllegalAccessException for stop method in class org.apache.tomcat.maven.plugin.tomcat7.run.ExtendedTomcat
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tomcat.maven.common.run.EmbeddedRegistry.shutdownAll(EmbeddedRegistry.java:110)
      at org.apache.tomcat.maven.common.run.EmbeddedRegistry$1.run(EmbeddedRegistry.java:69)
      Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[-1]]
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
      at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:351)
      ... 6 more
      Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Tomcat]]
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
      at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:753)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      ... 7 more
      Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Tomcat]]
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
      at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:502)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      ... 9 more
      Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/core/ContainerBase$StopChild
      at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1173)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      ... 11 more
      Caused by: java.lang.ClassNotFoundException: org.apache.catalina.core.ContainerBase$StopChild
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
      ... 13 more

      Attachments

        Activity

          People

            olamy Olivier Lamy
            vigi vigi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: