[ 
https://issues.apache.org/jira/browse/CACTUS-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850842#action_12850842
 ] 

Matthew Green commented on CACTUS-270:
--------------------------------------

I've copied the project to the following linux environment

SuSe Linux 10 SP2 64 bit
Tomcat 6.0.26 
Eclipse Galileo SR1 64bit
JDK 1.6.0_16 - 64bit
ant 1.7.1 
cactus 1.8.1

Running the tests in this environment doesn't leave Tomcat running and the Ant 
build exits normally.


> Cactus task Version 1.8 leaves the cargo started container (tomcat6x) running
> -----------------------------------------------------------------------------
>
>                 Key: CACTUS-270
>                 URL: https://issues.apache.org/jira/browse/CACTUS-270
>             Project: Cactus
>          Issue Type: Bug
>          Components: Ant Integration
>    Affects Versions: 1.8.1
>         Environment: Windows 7 64 bit, JDK 1.6.0_17 32 bit, tomcat 6.0.26, 
> Eclipse Galileo 32bit, ant 1.7.1, cactus 1.8.1
>            Reporter: Matthew Green
>            Priority: Minor
>
> I'm new to Apache Cactus so this may be a configuration issue but I couldn't 
> find anything similar in the bug database or on the Internet.
> I've created an Ant build file containing a Cactus ant task Version 1.8, 
> configured with cargo for the tomcat6x container.
> <target name="test" depends="cactifywar">
>               <cactus warfile="${cactified.war.file}" printsummary="yes">
>                       <classpath>
>                               <fileset dir="lib/cactus-1.8.1-bin/lib" />
>                               <pathelement location="${classes.src.dir}" />
>                               <pathelement location="${classes.test.dir}" />
>                               <pathelement 
> location="lib/commons-codec-1.4/commons-codec-1.4.jar" />
>                       </classpath>
>                       <containerset>
>                               <cargo containerId="tomcat6x" 
> output="${logs.dir}/output.log" log="${logs.dir}/cargo.log" 
> home="${tomcat6x.home}">
>                                       <configuration>
>                                               <property 
> name="cargo.servlet.port" value="8080" />
>                                               <property name="cargo.logging" 
> value="high" />
>                                               <deployable type="war" 
> file="${cactified.war.file}" />
>                                       </configuration>
>                               </cargo>
>                       </containerset>
>                       <formatter type="xml" />
>                       <batchtest todir="${test.reports.dir}">
>                               <fileset dir="${src.test.dir}">
>                                       <include name="**/Test*.java" />
>                                       <exclude name="**/TestAll.java" />
>                               </fileset>
>                       </batchtest>
>               </cactus>
>       </target>
> Upon running this task (I'm running it from within Eclipse) tomcat is 
> started, the tests are run, tomcat is stopped, but then tomcat is started 
> again then it fails to stop tomcat so the ant task doesn't exit. The 
> following is the output from the build
> Buildfile: D:\workspaces\workspace1\cache2\build.xml
> package-war:
> cactifywar:
> [cactifywar] Analyzing war: D:\workspaces\workspace1\cache2\cache2.war
> [cactifywar] Building war: 
> D:\workspaces\workspace1\cache2\cache2_cactified.war
> test:
>    [cactus] -----------------------------------------------------------------
>    [cactus] Running tests against Tomcat 6.x @ http://localhost:8080
>    [cactus] -----------------------------------------------------------------
>    [cactus] Deploying [D:\workspaces\workspace1\cache2\cache2_cactified.war] 
> to [C:\Users\matthew\AppData\Local\Temp\cargo\conf/webapps]...
>    [cactus] Tomcat 6.x starting...
> Server [Apache-Coyote/1.1] started
>    [cactus] Running TestCacheServlet
>    [cactus] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.205 sec
>    [cactus] Tomcat 6.x is stopping...
>    [cactus] Tomcat 6.x started on port [8080]
>    [cactus] Exception in thread "Thread-10" 
> org.codehaus.cargo.container.ContainerException: Failed to stop the Tomcat 
> 6.x container. Check the [D:\workspaces\workspace1\cache2\logs/output.log] 
> file containing the container logs for more details.
>    [cactus]   at 
> org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:192)
>    [cactus]   at 
> org.apache.cactus.container.ContainerWrapper.shutDown(ContainerWrapper.java:184)
>    [cactus]   at 
> org.apache.cactus.container.ContainerRunner$2.run(ContainerRunner.java:210)
>    [cactus]   at java.lang.Thread.run(Thread.java:619)
>    [cactus] Caused by: org.codehaus.cargo.container.ContainerException: 
> Deployable [http://localhost:8080/cargocpc/index.html] failed to finish 
> undeploying within the timeout period [120000]. The Deployable state is thus 
> unknown.
>    [cactus]   at 
> org.codehaus.cargo.container.spi.deployer.DeployerWatchdog.watch(DeployerWatchdog.java:111)
>    [cactus]   at 
> org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForCompletion(AbstractLocalContainer.java:212)
>    [cactus]   at 
> org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:187)
>    [cactus]   ... 3 more
>    [cactus] org.codehaus.cargo.container.ContainerException: Deployable 
> [http://localhost:8080/cargocpc/index.html] failed to finish undeploying 
> within the timeout period [120000]. The Deployable state is thus unknown.
>    [cactus]   at 
> org.codehaus.cargo.container.spi.deployer.DeployerWatchdog.watch(DeployerWatchdog.java:111)
>    [cactus]   at 
> org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForCompletion(AbstractLocalContainer.java:212)
>    [cactus]   at 
> org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:187)
>    [cactus]   at 
> org.apache.cactus.container.ContainerWrapper.shutDown(ContainerWrapper.java:184)
>    [cactus]   at 
> org.apache.cactus.container.ContainerRunner$2.run(ContainerRunner.java:210)
>    [cactus]   at java.lang.Thread.run(Thread.java:619)
> If I manually stop the Ant build Tomcat is left running in the background. If 
> a re-run the Ant task if finds that Tomcat is already running so runs the 
> tests then Ant exists normally (but leaves tomcat running).
> To stop Tomcat I have to start Task Manager and kill the Java task running 
> Tomcat.
> The following is the build output when running Ant with -verbose -debug
> Apache Ant version 1.7.1 compiled on June 27 2008
> Buildfile: D:\workspaces\workspace1\cache2\build.xml
> parsing buildfile D:\workspaces\workspace1\cache2\build.xml with URI = 
> file:/D:/workspaces/workspace1/cache2/build.xml
> Project base dir set to: D:\workspaces\workspace1\cache2
> [antlib:org.apache.tools.ant] Could not load definitions from resource 
> org/apache/tools/ant/antlib.xml. It could not be found.
> Build sequence for target(s) `test' is [package-war, cactifywar, test]
> Complete build sequence is [package-war, cactifywar, test, ]
> package-war:
>       [war] web.xml omitted as 
> D:\workspaces\workspace1\cache2\cache2.war:WEB-INF/web.xml is up to date.
>       [war]  omitted as 
> D:\workspaces\workspace1\cache2\cache2.war:WEB-INF/classes/ is up to date.
>       [war] CacheServlet.class omitted as 
> D:\workspaces\workspace1\cache2\cache2.war:WEB-INF/classes/CacheServlet.class 
> is up to date.
>       [war] No Implementation-Title set.No Implementation-Version set.No 
> Implementation-Vendor set.
>       [war] Location: D:\workspaces\workspace1\cache2\build.xml:34: 
> cactifywar:
> [cactifywar] Analyzing war: D:\workspaces\workspace1\cache2\cache2.war
> [cactifywar]  omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:WEB-INF/classes/ is up 
> to date.
> [cactifywar] TestCacheServlet.class omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:WEB-INF/classes/TestCacheServlet.class
>  is up to date.
> [cactifywar] META-INF/ omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:META-INF/ is up to date.
> [cactifywar] WEB-INF/ omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:WEB-INF/ is up to date.
> [cactifywar] WEB-INF/classes/ omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:WEB-INF/classes/ is up 
> to date.
> [cactifywar] META-INF/MANIFEST.MF omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:META-INF/MANIFEST.MF is 
> up to date.
> [cactifywar] WEB-INF/classes/CacheServlet.class omitted as 
> D:\workspaces\workspace1\cache2\cache2_cactified.war:WEB-INF/classes/CacheServlet.class
>  is up to date.
> [cactifywar] jspRedirector.jsp added as jspRedirector.jsp is outdated.
> [cactifywar] Building war: 
> D:\workspaces\workspace1\cache2\cache2_cactified.war
> [cactifywar] adding directory META-INF/
> [cactifywar] adding entry META-INF/MANIFEST.MF
> [cactifywar] adding directory WEB-INF/
> [cactifywar] adding directory WEB-INF/classes/
> [cactifywar] adding entry WEB-INF/classes/TestCacheServlet.class
> [cactifywar] adding entry WEB-INF/classes/CacheServlet.class
> [cactifywar] adding entry jspRedirector.jsp
> [cactifywar] adding entry WEB-INF/web.xml
> [cactifywar] adding directory WEB-INF/lib/
> [cactifywar] adding entry WEB-INF/lib/aspectjrt-1.5.3.jar
> [cactifywar] adding entry 
> WEB-INF/lib/cactus.core.framework.uberjar.javaEE.14-1.8.1.jar
> [cactifywar] adding entry WEB-INF/lib/commons-logging-1.1.jar
> [cactifywar] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
> [cactifywar] adding entry WEB-INF/lib/junit-3.8.2.jar
> [cactifywar] No Implementation-Title set.No Implementation-Version set.No 
> Implementation-Vendor set.
> [cactifywar] Location: D:\workspaces\workspace1\cache2\build.xml:41: 
> test:
>    [cactus] No mapping of the filter redirector found
>    [cactus] No mapping of the JSP redirector found
>    [cactus] Adding Cactus client system property 
> [cactus.servletRedirectorName] with value [ServletRedirector]
>    [cactus] -----------------------------------------------------------------
>    [cactus] Running tests against Tomcat 6.x @ http://localhost:8080
>    [cactus] -----------------------------------------------------------------
>    [cactus] Starting up container
>    [cactus] Deploying [D:\workspaces\workspace1\cache2\cache2_cactified.war] 
> to [C:\Users\matthew\AppData\Local\Temp\cargo\conf/webapps]...
>    [cactus] Tomcat 6.x starting...
> Server [Apache-Coyote/1.1] started
>    [cactus] Server name retrieved from 'Server' HTTP header: 
> [Apache-Coyote/1.1]
>    [cactus] Implicitly adding 
> D:\workspaces\workspace1\exampleTest\lib\cactus-1.8.1-bin\lib\junit-3.8.2.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant-launcher.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant-junit.jar
>  to CLASSPATH
>    [cactus] Executing 'C:\Program Files 
> (x86)\Java\jdk1.6.0_17\jre\bin\java.exe' with arguments:
>    [cactus] '-Dcactus.servletRedirectorName=ServletRedirector'
>    [cactus] '-Dcactus.contextURL=http://localhost:8080/cache2_cactified'
>    [cactus] '-classpath'
>    [cactus] 
> 'D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\aspectjrt-1.5.3.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cactus.core.framework.uberjar.javaEE.14-1.8.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cactus.integration.ant-1.8.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cactus.integration.shared.api-1.8.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cargo-ant-1.0-beta-2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cargo-core-container-jonas-1.0-beta-2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\cargo-core-uberjar-1.0-beta-2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\commons-discovery-0.4.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\commons-httpclient-3.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\commons-logging-1.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\geronimo-ejb_2.1_spec-1.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\geronimo-j2ee-management_1.0_spec-1.1.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\httpunit-1.6.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\jasper-compiler-5.5.9.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\jasper-runtime-5.5.9.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\junit-3.8.2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\mx4j-3.0.2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\mx4j-remote-3.0.2.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\nekohtml-1.9.6.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\org.mortbay.jetty-5.1.9.jar;D:\workspaces\workspace1\cache2\lib\cactus-1.8.1-bin\lib\servlet-api-2.4.jar;D:\workspaces\workspace1\cache2\build\classes;D:\workspaces\workspace1\cache2\build\testclasses;D:\workspaces\workspace1\cache2\lib\commons-codec-1.4\commons-codec-1.4.jar;D:\workspaces\workspace1\cache2;C:\Program
>  Files 
> (x86)\Java\jre6\lib\ext\QTJava.zip;D:\workspaces\workspace1\exampleTest\lib\cactus-1.8.1-bin\lib\junit-3.8.2.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant-launcher.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant.jar;C:\eclipse\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\lib\ant-junit.jar'
>    [cactus] 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
>    [cactus] 'TestCacheServlet'
>    [cactus] 'filtertrace=true'
>    [cactus] 'haltOnError=false'
>    [cactus] 'haltOnFailure=false'
>    [cactus] 
> 'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
>    [cactus] 'showoutput=false'
>    [cactus] 'outputtoformatters=true'
>    [cactus] 'logtestlistenerevents=true'
>    [cactus] 
> 'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,D:\workspaces\workspace1\cache2\target\tomcat6x\TEST-TestCacheServlet.xml'
>    [cactus] 
> 'crashfile=D:\workspaces\workspace1\cache2\junitvmwatcher4438781435377769574.properties'
>    [cactus] 
> 'propsfile=D:\workspaces\workspace1\cache2\junit813098093225493244.properties'
>    [cactus] 
>    [cactus] The ' characters around the executable and arguments are
>    [cactus] not part of the command.
>    [cactus] Running TestCacheServlet
>    [cactus] junit.framework.TestListener: tests to run: 1
>    [cactus] junit.framework.TestListener: 
> startTest(testDoGetErrorStatus400NoUrlParameter)
>    [cactus] junit.framework.TestListener: 
> endTest(testDoGetErrorStatus400NoUrlParameter)
>    [cactus] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.226 sec
>    [cactus] Shutting down container
>    [cactus] Tomcat 6.x is stopping...
>    [cactus] Tomcat 6.x started on port [8080]
> Why is it restarting Tomcat?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: cactus-dev-h...@jakarta.apache.org

Reply via email to