You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org> on 2015/11/23 01:07:10 UTC

[jira] [Commented] (MTOMCAT-276) Could not properly stop Tomcat when integration tests are failing

    [ https://issues.apache.org/jira/browse/MTOMCAT-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15021255#comment-15021255 ] 

Bruno P. Kinoshita commented on MTOMCAT-276:
--------------------------------------------

Had the same issue, was looking for the exception and found this SO answer

http://stackoverflow.com/questions/16935290/maven-deploy-webapp-to-tomcat-before-junit-test

Stephen Connolly suggested to use `mvn verify` instead of `mvn integration-test` (which I was using), and the error disappeared. Tests running smoothly now. 

HTH
Bruno

> Could not properly stop Tomcat when integration tests are failing
> -----------------------------------------------------------------
>
>                 Key: MTOMCAT-276
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-276
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat7
>    Affects Versions: 2.2
>            Reporter: vigi
>            Assignee: Olivier Lamy (*$^¨%`£)
>            Priority: Minor
>              Labels: integration-test, integration-tests, maven, tomcat
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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