Jacoco agent 0.7.5 - failed to start forked VM - missing PreMain class attribute in manifest

913 views
Skip to first unread message

Lin Chen

unread,
Jul 23, 2019, 4:54:58 PM7/23/19
to JaCoCo and EclEmma Users
There was an old similar case.  I am having the same problem in 0.7.5.  I am wondering how the 0.7.6 problem was solved.   
I have -javaagent:C:/Users/me/lib/org.jacoco.agent-0.7.5.201505241946.jar=[...] in my in IntelliJ VM Options.   When I run I got:

Failed to find Premain-Class manifest attribute in C:/Users/me/lib/org.jacoco.agent-0.7.5.201505241946.jar
Error occurred during initialization of VM
agent library failed to init: instrument

 Do I need add the runtime postfix as pointed out in that old case?  Is org.jacoco.agent-NNN.jar and org.jacoco.agent-NNN-runtime.mar the same?

Evgeny Mandrikov

unread,
Jul 23, 2019, 9:03:38 PM7/23/19
to JaCoCo and EclEmma Users
As explained in documentation on page https://www.jacoco.org/jacoco/trunk/doc/repo.html


org.jacoco.agent-0.7.5.201505241946-runtime.jar

is the jar of agent with Premain-Class header and exactly this jar should be used for java parameter "-javaagent"

org.jacoco.agent-0.7.5.201505241946.jar

is not agent and has no Premain-Class header,
it is an API to obtain the agent as a resource.

This applies for all JaCoCo versions up to latest released as of today 0.8.4, including 0.7.5 and 0.7.6

hùng cường võ

unread,
Jul 27, 2019, 1:26:48 PM7/27/19
to jac...@googlegroups.com
Hi guys,

I have a issues when run  cobertura, please help me to fix it.
I have a test file that is covered 100% when i run Junit in eclipse, but  it just be 50% when i run it by cobertura  without error or failure. A
fter that, i see a function  in middel of this file which make cobertura fail. I moved it to end of test file and run again. this test file is covered 100% without error or failure.
I don't how. please help me to clarify cause.

Thank you so much.

Vào Th 4, 24 thg 7, 2019 vào lúc 08:03 Evgeny Mandrikov <mand...@gmail.com> đã viết:
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/49919127-9b75-4811-b8fd-d6af9ce04a09%40googlegroups.com.

Evgeny Mandrikov

unread,
Jul 29, 2019, 12:59:34 PM7/29/19
to JaCoCo and EclEmma Users


On Saturday, July 27, 2019 at 7:26:48 PM UTC+2, oliver wrote:
Hi guys,

I have a issues when run  cobertura, please help me to fix it.
I have a test file that is covered 100% when i run Junit in eclipse, but  it just be 50% when i run it by cobertura  without error or failure. A
fter that, i see a function  in middel of this file which make cobertura fail. I moved it to end of test file and run again. this test file is covered 100% without error or failure.
I don't how. please help me to clarify cause.


This mailing list is about JaCoCo project (https://www.jacoco.org/jacoco/)
and about Eclipse EclEmma (https://www.eclemma.org/) that is based on JaCoCo.

But not about Cobertura (https://cobertura.github.io/cobertura/),
so please seek help about Cobertura from its maintainers/developers.

 

Thank you so much.

Vào Th 4, 24 thg 7, 2019 vào lúc 08:03 Evgeny Mandrikov <mand...@gmail.com> đã viết:


On Tuesday, July 23, 2019 at 10:54:58 PM UTC+2, Lin Chen wrote:
There was an old similar case.  I am having the same problem in 0.7.5.  I am wondering how the 0.7.6 problem was solved.   
I have -javaagent:C:/Users/me/lib/org.jacoco.agent-0.7.5.201505241946.jar=[...] in my in IntelliJ VM Options.   When I run I got:

Failed to find Premain-Class manifest attribute in C:/Users/me/lib/org.jacoco.agent-0.7.5.201505241946.jar
Error occurred during initialization of VM
agent library failed to init: instrument

 Do I need add the runtime postfix as pointed out in that old case?  Is org.jacoco.agent-NNN.jar and org.jacoco.agent-NNN-runtime.mar the same?

As explained in documentation on page https://www.jacoco.org/jacoco/trunk/doc/repo.html


org.jacoco.agent-0.7.5.201505241946-runtime.jar

is the jar of agent with Premain-Class header and exactly this jar should be used for java parameter "-javaagent"

org.jacoco.agent-0.7.5.201505241946.jar

is not agent and has no Premain-Class header,
it is an API to obtain the agent as a resource.

This applies for all JaCoCo versions up to latest released as of today 0.8.4, including 0.7.5 and 0.7.6

--
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+unsubscribe@googlegroups.com.

hùng cường võ

unread,
Jul 30, 2019, 5:02:58 AM7/30/19
to jac...@googlegroups.com
sorry, thank you so much!.

Vào Th 2, 29 thg 7, 2019 vào lúc 23:59 Evgeny Mandrikov <mand...@gmail.com> đã viết:

Thank you so much.

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/3be59d3a-2cbd-4d03-9a00-88c5e03ef7e9%40googlegroups.com.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages