Hi,
To write dump file JaCoCo registers standard JVM ShutDown hook ( see
http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)
), whose execution not guaranteed if JVM was not gracefully terminated. So
probably the first thing to check - is how Tomcat terminated.
On Monday, August 24, 2015 at 6:22:06 PM UTC+2, Glenn Caccia wrote:
>
> Hey all,
>
> I'm trying to get code coverage for a tomcat app. I've used jacoco before
> for tomcat apps and have been successful in getting reports. My process is
> to attach the jacoco agent to the tomcat process, run my tests, shut down
> tomcat, and then generate a report using a maven project with the
> jacoco.exec and src files as the source material (see below for agent
> config). With this latest tomcat app, however, after shutting down the
> tomcat app, jacoco.exec has a size of 0. Despite this, it is creating
> class dump files, which would seem to suggest that it is recognizing the
> execution of code. Does that make any sense? Any ideas on what would
> cause jacoco.exec to be empty despite the creation of class dump files?
> One thing that is different about this tomcat app compared to others is
> that it is a multi-module project. Would that cause problems in this
> context? If yes, any suggestions on how to work around the problem?
>
> Thanks,
>
> Glenn
>
>
> -javaagent:${CATALINA_BASE}/webapps/tomcatAppName/WEB-INF/lib/jacocoagent.jar=output=file,destfile=${CATALINA_BASE}/logs/jacoco.exec,dumponexit=true,includes=com.mycompany.rss.mme.*,classdumpdir=${CATALINA_BASE}/logs/classes,append=false
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/aabb47f1-c9a3-4c7b-9858-845c091e0044%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.