Thanks Marc for the reply. I am trying to generate multiple execution files 
for each module, as I had trouble generating reports from a single exec 
file, operation ending with IllegalStateException for same name classes. I 
tried doing a multi-module maven setup but it didn't work for me. I have to 
generate coverage data without running tests or going through 
maven-surefire-plugin. I want to gather data off a regular JVM. What are my 
options here?

Thanks for the support!!

On Friday, 24 January 2020 18:28:23 UTC+5:30, Marc R. Hoffmann wrote:
>
> Hi,
>
> you cannot specify multiple JaCoCo agent for the same JVM.
>
> Regards,
> -marc
>
> On 24. Jan 2020, at 13:56, Parvaz Bhaskar <[email protected] 
> <javascript:>> wrote:
>
> Update: I've tried the same thing with a simpler project with two 
> packages. The result is same, the port passed as second jacocoagent doesn't 
> open.
>
> On Friday, 24 January 2020 16:34:03 UTC+5:30, Parvaz Bhaskar wrote:
>>
>> Hi,
>>
>> I am trying to use the on-the-fly instrumentation on hive source code by 
>> passing jacocoagent.jar as a javaagent. Everything works fine for single 
>> javaagent but when I try to pass multiple javaagents the socket connection 
>> is only opened for the first passed javaagent. These are my final java 
>> options that i get after jps -lvm
>>
>> org.apache.hadoop.util.RunJar /mnt/c/Users/admin/work/apache-hive/hive/
>> packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-
>> SNAPSHOT-bin/lib/hive-cli-4.0.0-SNAPSHOT.jar org.apache.hadoop.hive.cli.
>> CliDriver -Dproc_jar -Djava.net.preferIPv4Stack=true -Dproc_hivecli -
>> javaagent:/mnt/c/Users/admin/work/apache-hive/hive/packaging/target/
>> apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/lib/
>> jacocoagent.jar=output=tcpserver,port=5005,includes=org.apache.hadoop.
>> hive.cli.* -javaagent:/mnt/c/Users/admin/work/apache-hive/hive/packaging/
>> target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/lib/
>> jacocoagent.jar=output=tcpserver,port=5006,includes=org.apache.hadoop.
>> hive.*,excludes=org.apache.hadoop.hive.ql.*:org.apache.hadoop.hive.cli.* 
>> -Dlog4j.configurationFile=hive-log4j2.properties -Djava.util.logging.
>> config.file=/mnt/c/Users/admin/work/apache-hive/hive/packaging/target/
>> apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/conf/
>> parquet-logging.properties -Djline.terminal=jline.UnsupportedTerminal -
>> Dyarn.log.dir=/mnt/c/Users/admin/work/hadoop-local/hadoop/logs -Dyarn.log
>> .file=hadoop.log -Dyarn.home.dir=/mnt/c/Users/admin/work/hadoop-local/
>> hadoop -Dyarn.root.logger=INFO,console -Djava.librar   
>>
>> As you can see I am trying to use two jacoco agents on port 5005 and 
>> 5006. I then use ExecutionDataClient Example to dump the .exec. It works 
>> only for one port, whichever is declared first. The second port says 
>> connection refused. I checked with netstat -an on command prompt and I can 
>> see only the port which was declared first is opening. Also the second 
>> jacocoagent does try to instrument the code as I receive instrumentation 
>> error if I remove the excludes option. So the jacocoagent is loaded only 
>> not able to open the port. Please can someone point me in the right 
>> direction?
>>
>
> -- 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/263e7388-966b-4c53-9eee-3597a157e697%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/263e7388-966b-4c53-9eee-3597a157e697%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/fc0d03cc-fa7b-4cc7-8293-11481669175f%40googlegroups.com.

Reply via email to