Exec file only contains tomcat package coverage data, but not our codes coverage.

3,394 views
Skip to first unread message

Robin.von

unread,
Dec 19, 2012, 9:27:39 AM12/19/12
to jac...@googlegroups.com
Hi 

I using below settings in our lunch tomcat shell file.
export JAVA_OPTS="$JAVA_OPTS -javaagent:/etc/init.d/jacocoagent.jar=destfile=/etc/init.d/jacoco.exec"

that means I want to collect all coverage data in the jacoco.exec file by default.  after some testing for my codes, the exec file add about 2k bytes every time when I shutdown tomcat instance. But I can only find some coverage data about tomcat packages.

Then I update my configurations to:
export JAVA_OPTS="$JAVA_OPTS -javaagent:/etc/init.d/jacocoagent.jar=destfile=/etc/init.d/jacoco.exec,includes=com.name1.name2.*:com.name3.name4.*"

"com.name1.name2.*:com.name3.name4.*" is my package name in my source code. It still only contains tomcat package coverage data in exec file.

How can I find my codes coverage data?


Here is the session info I copied from my report:
Class Id
org.apache.catalina.ServerFactory 1ae84edd3547c9a8
org.apache.catalina.core.NamingContextListener 345b6fd22c0fac9f
org.apache.catalina.core.StandardServer 55f5a39b306f50fd
org.apache.catalina.core.StandardService adc50840bb04a33e
org.apache.catalina.deploy.NamingResources 37db1828899a273e
org.apache.catalina.loader.StandardClassLoader c56f972d72fb68a6
org.apache.catalina.security.SecurityClassLoad 8822baaa4f248edd
org.apache.catalina.security.SecurityConfig 56ed31ddd858a09e
org.apache.catalina.startup.Bootstrap 6cae58405c153ed1
org.apache.catalina.startup.Catalina 329e59ca61270c50
org.apache.catalina.startup.CatalinaProperties 4223692d4c0ca7bd
org.apache.catalina.startup.ClassLoaderFactory f504d93543724d00
org.apache.catalina.startup.Embedded c28334be56992c2a
org.apache.catalina.util.LifecycleSupport 8a71d9b67a20df72
org.apache.catalina.util.StringManager 54a27941f34d08b3
org.apache.juli.ClassLoaderLogManager 99da858cdeef5822
org.apache.juli.ClassLoaderLogManager.1 8de33ea04e5e075e
org.apache.juli.ClassLoaderLogManager.2 b934a5988d71dd7b
org.apache.juli.ClassLoaderLogManager.3 17b7c514efdde89a
org.apache.juli.ClassLoaderLogManager.ClassLoaderLogInfo 9014455fcf5f97ec
org.apache.juli.ClassLoaderLogManager.Cleaner b7dd99b161c37fb6
org.apache.juli.ClassLoaderLogManager.LogNode e46181c02e3557c1
org.apache.juli.ClassLoaderLogManager.RootLogger 0ba51b1773a15c91
org.apache.juli.logging.DirectJDKLog 14b6cd2eab5097f1
org.apache.juli.logging.LogFactory 7a92a4ad9aad8009
org.apache.tomcat.util.IntrospectionUtils 0b94abd465f4d6f9
org.apache.tomcat.util.digester.ArrayStack fb3c720b228bc96e
org.apache.tomcat.util.digester.Digester 5263b67f27b1e19f
org.apache.tomcat.util.digester.Digester.SystemPropertySource ad75442da067d6b5
org.apache.tomcat.util.digester.ObjectCreateRule 3bd02adae376bb7c
org.apache.tomcat.util.digester.Rule b6c4dcfb92f67fe4
org.apache.tomcat.util.digester.RulesBase dc1edcb932d2db6e
org.apache.tomcat.util.digester.SetNextRule 4150d3f2799b17d5
org.apache.tomcat.util.digester.SetPropertiesRule 91dd04dfbb2113e0





Marc Hoffmann

unread,
Dec 19, 2012, 12:53:46 PM12/19/12
to jac...@googlegroups.com
Hi,

please make sure you have not set the append agent option or if set
append=true. Tomcat launches multiple VMs especially at shutdown another
JVM will be started to trigger the shutdown of the main JVM. In case
append=false you will only see the classes loaded the the controller
JVM, not by the actual container of your app.

Anyways I would recommend to use the CATALINA_OPTS variable as this
variable is only used for the tomcat JVM, not for other JVMs.

Best regards,
-marc
> --

Robin.von

unread,
Dec 19, 2012, 10:03:04 PM12/19/12
to jac...@googlegroups.com
Hi Marc

Thanks for your reply.

I didn't add "append" option in my configuration. It should set to "true" by default.

I changed my setting to:

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/etc/init.d/jacocoagent.jar=destfile=/etc/init.d/jacoco.exec"
echo "User added for code coverage"

When restart tomcat server, I can find echo message in console to make sure my settings are loaded.

Also I try to add upper settings to ${tomcat_home}/bin/startup.sh

But I always cannot find my codes coverage data in /etc/init.d/jacoco.exec file.


What's wrong with my settings?


在 2012年12月20日星期四UTC+8上午1时53分46秒,Marc R. Hoffmann写道:

Robin.von

unread,
Dec 20, 2012, 3:22:35 AM12/20/12
to jac...@googlegroups.com
Hi 

I updated my settings to 
export JAVA_OPTS="$JAVA_OPTS -javaagent:/etc/init.d/jacocoagent.jar=output=tcpserver,port=10001,address=*,excludes=org.* "

And add this setting to ${tomcat_home}/bin/startup.sh.

Then use tcp client to get data. It works now.

But if I change JAVA_OPTS to CATALINA_OPTS, it will cause socket connection failed.

Also it is failed when I add this setting in my lunchtomcat shell file.



在 2012年12月20日星期四UTC+8上午11时03分04秒,Robin.von写道:

pawlu...@gmail.com

unread,
Aug 29, 2013, 8:41:29 AM8/29/13
to jac...@googlegroups.com
Hi Robin,
I have the same exact problem. My guess is that some thread is being created at shutdown and this overwrites the coverage. Could you please explain how you created your tcp client please? (i.e. any configurations) I tried starting up another tomcat on localhost but could not manage to get them to communicate (the tomcat with jacoco and the other tomcat)

Thanks,
Paul

Marc Hoffmann

unread,
Aug 29, 2013, 9:47:15 AM8/29/13
to jac...@googlegroups.com
Unless you configure the agent option append=false JaCoCo will not
overwrite existing exec files.

-marc

pawlu...@gmail.com

unread,
Aug 29, 2013, 10:14:44 AM8/29/13
to jac...@googlegroups.com
Hi Marc,

Thanks for your reply. At first I did not set the append option and then set it to true but none of them did work. Let me explain what I am doing because I think I am missing something. I am still an intern and maybe I'm missing something trivial.

1. First I have a small Java Servlet that I compile to a WAR file using maven. (no jacoco dependencies or plugins are added)

2. I put the WAR file to Tomcat and add:
-javaagent:[[myLocation]]\jacoco-0.6.3.201306030806\lib\jacocoagent.jar

to the JAVA OPTS.

3. 'jacoco.exec' is produced and then compile the report with the sources.

Marc R. Hoffmann

unread,
Aug 29, 2013, 2:09:56 PM8/29/13
to jac...@googlegroups.com
Hi Paul,

I'm not an expert in Tomcat setups. AFAIK there are two JVMs involved:
One which start and stops the server instance and one which is the
actual Tomcat server. It looks like you attached the JaCoCo agent to the
controller instance only. Documentation says the proper environment
variable for the actual server is CATALINA_OPTS.

See http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt

Cheers,
-marc

Paul Felice

unread,
Sep 2, 2013, 7:14:08 AM9/2/13
to jac...@googlegroups.com
Hi Marc,

Thanks once again for your reply and dedication.

I have tried as you said, and looked up CATALINA_OPTS. It seems to be used just to avoid overriding JAVA_OPTS when more than one instance are doing "EXPORT JAVA_OPTS..." Nonetheless, I have tried using CATALINA_OPTS but got the same results. I am posting a more detailed scenario of what I am doing. (Once again many thanks for your help, it is very much appreciated).

NB: I am using
- Maven3
- JDK 1.7
- Tomcat 7.0.42

I have a Java Servlet Project in Eclipse that uses Maven having just one class:


JsGrabberServlet.java
package com.ix**s.uitest.servlet;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * This class listens to all the GETs and POSTs. It's main function is to read the JavaScript
 * errors and log them to a log file.
 * @author paul.felice
 *
 */
public class JsGrabberServlet extends HttpServlet {

private static final long serialVersionUID = 1307842006715835042L;

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}

@Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doDelete(req, resp);
}



@Override
protected void doHead(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doHead(req, resp);
}



@Override
protected void doOptions(HttpServletRequest arg0, HttpServletResponse arg1)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doOptions(arg0, arg1);
}



@Override
protected void doPut(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doPut(req, resp);
}



@Override
protected void doTrace(HttpServletRequest arg0, HttpServletResponse arg1)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doTrace(arg0, arg1);
}



@Override
protected long getLastModified(HttpServletRequest req) {
// TODO Auto-generated method stub
return super.getLastModified(req);
}



@Override
protected void service(HttpServletRequest arg0, HttpServletResponse arg1)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.service(arg0, arg1);
}



@Override
public void service(ServletRequest req, ServletResponse res)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.service(req, res);
}



@Override
protected void doPost(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
IOException {

// Reading the Javascript error
String errorMsg = request.getParameter("errorMsg");
String sourceMsg = request.getParameter("sourceMsg");
String lineNum = request.getParameter("lineNum");

//Create a File, if file is already there append to it.
File f = new File("JsErrors.log");
if(!f.exists()){
f.createNewFile();
}
BufferedWriter br = new BufferedWriter(new FileWriter(f, true));

// Defining the time and date format
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// Constructing the String
String s = sdf.format(new Date())
+ "|" + errorMsg
+ "|" + sourceMsg
+ "|" + lineNum;
//Writing to file
br.write(s+System.lineSeparator());
br.close();
//respond ok
response.setStatus(HttpServletResponse.SC_OK);
}
}

As you can see this is a very basic servlet.

The pom file is also very simple:

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ix**s.utils</groupId>
<artifactId>utils</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>js-error-grabber</artifactId>
<name>js-error-grabber</name>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.thetransactioncompany</groupId>
<artifactId>cors-filter</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>
</plugin>
<!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>emma-maven-plugin</artifactId> 
<version>1.0-alpha-3</version> <inherited>true</inherited> <executions> <execution> 
<phase>process-classes</phase> <goals> <goal>instrument</goal> </goals> </execution> 
</executions> </plugin> -->
</plugins>
<finalName>js-error-grabber</finalName>
</build>
</project>

Using Maven3, I perform 
mvn clean install

and copy the resultant .WAR file into Tomcat webapps directory and add:
set CATALINA_OPTS= "-javaagent:${mydir}\jacoco-0.6.3.201306030806\lib\jacocoagent.jar"

to catalina.bat. (startup.bat calls catalina.bat)

I use the servlet and shutdown Tomcat at which point jacoco.exec is filled up.

Now I move:

1. jacoco.exec file
2. src directory with inside "com\i**s\uitest\servlet\JsGrabberServlet.java" and "main\java\com\i**s\uitest\servlet\JsGrabberServlet.java"
3. org directory with "jacoco\ReportGenerator.java" and "jacoco\ReportGenerator.class"
4. bin directory
5. coveragereport directory
6. asm-all-4.1.jar (ReportGenerator needs it)
7. org.jacoco.core-0.6.3.201306030806.jar
8. org.jacoco.report-0.6.3.201306030806.jar

to a directory:

now I run:

java -cp .;org.jacoco.core-0.6.3.201306030806.jar;org.jacoco.report-0.6.3.201306030806.jar;asm-all-4.1.jar org.jacoco.ReportGenerator .

(the dot at the end tells the ReportGenerator to look for jacoco.exec in the current directory, but I guess you already know this :p)

I get the coverage reported in the coveragereport directory

but index.html looks like this:

and .sessions.html looks like this:


Once again thanks for your help :) It is much appreciated :)
Thanks
Paul

Paul Felice

unread,
Sep 2, 2013, 7:56:53 AM9/2/13
to jac...@googlegroups.com
I have also managed to set the output to tcpserver and tcpclient and have a client/server listening respectively. Despite them working fine, they still produce the same jacoco.exec file and the same results

Marc R. Hoffmann

unread,
Sep 4, 2013, 12:44:03 AM9/4/13
to jac...@googlegroups.com
Hi Paul,

this is strange. Can you please run JConsole on your test machine and
check the running JVMs? JConsole shows the VM args so you should see
where the JaCoCo agent is attached.

Cheers,
-marc


On 02.09.13 13:56, Paul Felice wrote:
> I have also managed to set the output to tcpserver and tcpclient and
> have a client/server listening respectively. Despite them working fine,
> they still produce the same jacoco.exec file and the same results
>
> On Monday, 2 September 2013 13:14:08 UTC+2, Paul Felice wrote:
>
> Hi Marc,
>
> Thanks once again for your reply and dedication.
>
> I have tried as you said, and looked up CATALINA_OPTS. It seems to
> be used just to avoid overriding JAVA_OPTS when more than one
> instance are doing "EXPORT JAVA_OPTS..." Nonetheless, I have tried
> using CATALINA_OPTS but got the same results. I am posting a more
> detailed scenario of what I am doing. (Once again many thanks for
> your help, it is very much appreciated).
>
> NB: I am using
> - Maven3
> - JDK 1.7
> - Tomcat 7.0.42
>
> I have a Java Servlet Project in Eclipse that uses Maven having just
> one class:
>
> <https://lh4.googleusercontent.com/-9eJdQhWt9ag/UiRr-VRStYI/AAAAAAAAAIQ/bFM54X-XQOA/s1600/Capture1.PNG>
> <http://maven.apache.org/POM/4.0.0>
> http://maven.apache.org/maven-v4_0_0.xsd
> <https://lh5.googleusercontent.com/-UoJWSitRUDs/UiRys-WxaAI/AAAAAAAAAJA/nCVxFP7yUkA/s1600/Capture6.PNG>
>
> <https://lh3.googleusercontent.com/-Ix-rLMft9dk/UiRwarcg7YI/AAAAAAAAAIc/0uu4MGLwQq8/s1600/Capture2.PNG>
>
> now I run:
>
> |
> java -cp
> .;org.jacoco.core-0.6.3.201306030806.jar;org.jacoco.report-0.6.3.201306030806.jar;asm-all-4.1.jar
> org.jacoco.ReportGenerator .
> |
>
> (the dot at the end tells the ReportGenerator to look for
> jacoco.exec in the current directory, but I guess you already know
> this :p)
>
> I get the coverage reported in the coveragereport directory
>
> <https://lh6.googleusercontent.com/-jqmmK_jj60A/UiRxY0569TI/AAAAAAAAAIk/YGCsBwJA1V8/s1600/Capture3.PNG>
>
> but index.html looks like this:
>
> <https://lh6.googleusercontent.com/-rFa_DuJEVrM/UiRxu1k2IyI/AAAAAAAAAIs/RVvIKQAzpRU/s1600/Capture4.PNG>
>
> and .sessions.html looks like this:
>
> <https://lh6.googleusercontent.com/-ay3-kx8Unz0/UiRyNsInpvI/AAAAAAAAAI0/gC1REtj9brA/s1600/Capture5.PNG>
> >>>> 锟斤拷 2012锟斤拷12锟斤拷20锟斤拷锟斤拷锟斤拷锟斤拷UTC+8锟斤拷锟斤拷11时03锟斤拷04锟诫,Robin.von写锟斤拷锟斤拷
> >>
> >>>> Hi Marc
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> Thanks for your reply.
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> I didn't add "append" option in my configuration. It
> should set to
> >>
> >>>> "true" by default.
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> I changed my setting to:
> >>
> >>>>
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS
> >>
> >>>>
> -javaagent:/etc/init.d/jacocoagent.jar=destfile=/etc/init.d/jacoco.exec"
>
> >>
> >>>> echo "User added for code coverage"
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> When restart tomcat server, I can find echo message in
> console to make
> >>
> >>>> sure my settings are loaded.
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> Also I try to add upper settings to
> ${tomcat_home}/bin/startup.sh
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> But I always cannot find my codes coverage data
> >>
> >>>> in /etc/init.d/jacoco.exec file.
> >>
> >>>>
> >>
> >>>>
> >>
> >>>>
> >>
> >>>>
> >>
> >>>> What's wrong with my settings?
> >>
> >>>>
> >>
> >>>> 锟斤拷 2012锟斤拷12锟斤拷20锟斤拷锟斤拷锟斤拷锟斤拷UTC+8锟斤拷锟斤拷1时53锟斤拷46锟诫,Marc R.
> Hoffmann写锟斤拷锟斤拷Hi,
> --
> You received this message because you are subscribed to the Google
> Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


--
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

Paul Felice

unread,
Sep 5, 2013, 7:00:01 AM9/5/13
to jac...@googlegroups.com
Hi Marc,

I have done as you told me so and this is a screenshot:

Thanks a million :) 
Paul

Marc Hoffmann

unread,
Sep 9, 2013, 3:12:10 AM9/9/13
to jac...@googlegroups.com
How do you shutdown the server after testing?

-marc


On 2013-09-05 13:00, Paul Felice wrote:
> Hi Marc,
>
> I have done as you told me so and this is a screenshot:
>
> [12]
>> [1]>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0 [2]
>>> <http://maven.apache.org/POM/4.0.0 [2]>"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance [3]
>>> <http://www.w3.org/2001/XMLSchema-instance [3]>"
>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 [2]
>>> <http://maven.apache.org/POM/4.0.0 [2]>
>>> http://maven.apache.org/maven-v4_0_0.xsd [4]
>>> <http://maven.apache.org/maven-v4_0_0.xsd [4]>">
>>> "-javaagent:${mydir}jacoco-0.6.3.201306030806libjacocoagent.jar"
>>> |
>>>
>>> to catalina.bat. (startup.bat calls catalina.bat)
>>>
>>> I use the servlet and shutdown Tomcat at which point jacoco.exec
>> is
>>> filled up.
>>>
>>> Now I move:
>>>
>>> 1. jacoco.exec file
>>> 2. src directory with inside
>>> "comi**suitestservletJsGrabberServlet.java" and
>>> "mainjavacomi**suitestservletJsGrabberServlet.java"
>>> 3. org directory with "jacocoReportGenerator.java" and
>>> "jacocoReportGenerator.class"
>>> 4. bin directory
>>> 5. coveragereport directory
>>> 6. asm-all-4.1.jar (ReportGenerator needs it)
>>> 7. org.jacoco.core-0.6.3.201306030806.jar
>>> 8. org.jacoco.report-0.6.3.201306030806.jar
>>>
>>> to a directory:
>>>
>>>
>>
> <https://lh5.googleusercontent.com/-UoJWSitRUDs/UiRys-WxaAI/AAAAAAAAAJA/nCVxFP7yUkA/s1600/Capture6.PNG
>> [5]>
>>>
>>>
>>
> <https://lh3.googleusercontent.com/-Ix-rLMft9dk/UiRwarcg7YI/AAAAAAAAAIc/0uu4MGLwQq8/s1600/Capture2.PNG
>> [6]>
>>>
>>> now I run:
>>>
>>> |
>>> java -cp
>>>
>>
> .;org.jacoco.core-0.6.3.201306030806.jar;org.jacoco.report-0.6.3.201306030806.jar;asm-all-4.1.jar
>>
>>> org.jacoco.ReportGenerator .
>>> |
>>>
>>> (the dot at the end tells the ReportGenerator to look for
>>> jacoco.exec in the current directory, but I guess you already know
>>
>>> this :p)
>>>
>>> I get the coverage reported in the coveragereport directory
>>>
>>>
>>
> <https://lh6.googleusercontent.com/-jqmmK_jj60A/UiRxY0569TI/AAAAAAAAAIk/YGCsBwJA1V8/s1600/Capture3.PNG
>> [7]>
>> [8]>
>> [9]>
>>>
>>>
>>> Once again thanks for your help :) It is much appreciated :)
>>> Thanks
>>> Paul
>>>
>>> On Thursday, 29 August 2013 20:09:56 UTC+2, Marc R. Hoffmann
>> wrote:
>>>
>>> Hi Paul,
>>>
>>> I'm not an expert in Tomcat setups. AFAIK there are two JVMs
>>> involved:
>>> One which start and stops the server instance and one which is the
>>
>>> actual Tomcat server. It looks like you attached the JaCoCo
>>> agent to the
>>> controller instance only. Documentation says the proper
>> environment
>>> variable for the actual server is CATALINA_OPTS.
>>>
>>> See http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt [10]
>>> <http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt [10]>
>>>
>>> Cheers,
>>> -marc
>>>
>>> On 29.08.13 16:14, pawlu...@gmail.com wrote:
>>>> Hi Marc,
>>>>
>>>> Thanks for your reply. At first I did not set the append
>>> option and then set it to true but none of them did work. Let me
>>> explain what I am doing because I think I am missing something.
>>> I am still an intern and maybe I'm missing something trivial.
>>>>
>>>> 1. First I have a small Java Servlet that I compile to a WAR
>>> file using maven. (no jacoco dependencies or plugins are added)
>>>>
>>>> 2. I put the WAR file to Tomcat and add:
>>>>
>>>
>> -javaagent:[[myLocation]]jacoco-0.6.3.201306030806libjacocoagent.jar
>> [11].
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out
> [11].
>
>
> Links:
> ------
> [1]
> https://lh4.googleusercontent.com/-9eJdQhWt9ag/UiRr-VRStYI/AAAAAAAAAIQ/bFM54X-XQOA/s1600/Capture1.PNG
> [2] http://maven.apache.org/POM/4.0.0
> [3] http://www.w3.org/2001/XMLSchema-instance
> [4] http://maven.apache.org/maven-v4_0_0.xsd
> [5]
> https://lh5.googleusercontent.com/-UoJWSitRUDs/UiRys-WxaAI/AAAAAAAAAJA/nCVxFP7yUkA/s1600/Capture6.PNG
> [6]
> https://lh3.googleusercontent.com/-Ix-rLMft9dk/UiRwarcg7YI/AAAAAAAAAIc/0uu4MGLwQq8/s1600/Capture2.PNG
> [7]
> https://lh6.googleusercontent.com/-jqmmK_jj60A/UiRxY0569TI/AAAAAAAAAIk/YGCsBwJA1V8/s1600/Capture3.PNG
> [8]
> https://lh6.googleusercontent.com/-rFa_DuJEVrM/UiRxu1k2IyI/AAAAAAAAAIs/RVvIKQAzpRU/s1600/Capture4.PNG
> [9]
> https://lh6.googleusercontent.com/-ay3-kx8Unz0/UiRyNsInpvI/AAAAAAAAAI0/gC1REtj9brA/s1600/Capture5.PNG
> [10] http://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt
> [11] https://groups.google.com/groups/opt_out
> [12]
> https://lh6.googleusercontent.com/-b7cSMpJiM7Q/UihkD-6OZ-I/AAAAAAAAAJQ/ikiAorCO-3w/s1600/Capture7.PNG

Paul Felice

unread,
Sep 9, 2013, 4:16:36 AM9/9/13
to jac...@googlegroups.com
Hi Marc,

I have tried shutting down tomcat using 3 methods:

- Crtl-C
- running shutdown.bat/sh
- sending "SHUTDOWN" to tomcat's shutdown port

All of the three shutdown tomcat successfully but all with the same result as to coverage.
Thanks
Paul
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages