Hi,
On Thursday, August 9, 2018 at 10:48:26 PM UTC+2, Xiaohan Gao wrote:
>
> Is there any other thing I can do?
>
You can study a bit more carefully documentation and mentioned by you blog.
Execution of
java -help
shows
-D<name>=<value>
set a system property
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see
java.lang.instrument
Thus
java -Djavaagent:jacoco-0.8.1/lib/jacocoagent.jar=port=6300
is wrong.
java -javaagent=jacoco-0.8.1/lib/jacocoagent.jar=port=6300
is also wrong because after "-javaagent" should be colon! and equal sign is
only after path.
Correct is:
java -javaagent:jacoco-0.8.1/lib/jacocoagent.jar=port=6300
Exactly as written in https://www.jacoco.org/jacoco/trunk/doc/agent.html
and in mentioned by you blog.
Regards,
Evgeny
On Thursday, August 9, 2018 at 10:48:26 PM UTC+2, Xiaohan Gao wrote:
>
> But I removed 'D' and the server cannot be started anymore.... Is there
> any other thing I can do?
>
> On Thu, Aug 9, 2018 at 1:40 PM, Marc Hoffmann <[email protected]>
> wrote:
>
>> Because then it is plain system property definition which will not have
>> any effect at all.
>>
>> On 9. Aug 2018, at 22:38, Xiaohan Gao <[email protected]>
>> wrote:
>>
>> The problem is that only after I adding 'D' before 'javaagent', there
>> will be no more error message
>>
>> On Thu, Aug 9, 2018 at 1:37 PM, Xiaohan Gao <
>> [email protected]> wrote:
>>
>>> Yes I did.
>>>
>>> On Thu, Aug 9, 2018 at 1:36 PM, Marc Hoffmann <
>>> [email protected]> wrote:
>>>
>>>> Did you replace "<path to jacoco>” with the actual location on your
>>>> system???
>>>>
>>>>
>>>> On 9. Aug 2018, at 22:34, Xiaohan Gao <
>>>> [email protected]> wrote:
>>>>
>>>> But if I modify it as you mentioned, the server will not be able to
>>>> start with the following error message:
>>>> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
>>>> MaxPermSize=256m; support was removed in 8.0
>>>> Unrecognized option: -javaagent=<path to
>>>> jacoco>/jacocoagent.jar=port=6300,destfile=jacoco-remote.exec,output=tcpserver,address=*
>>>> Error: Could not create the Java Virtual Machine.
>>>> Error: A fatal exception has occurred. Program will exit.
>>>>
>>>>
>>>> On Thu, Aug 9, 2018 at 1:30 PM, Marc Hoffmann <
>>>> [email protected]> wrote:
>>>>
>>>>> I’s just one character:
>>>>>
>>>>> WRONG: -Djavagent
>>>>> CORRECT: -javaagent
>>>>>
>>>>>
>>>>> On 9. Aug 2018, at 22:16, Xiaohan Gao <
>>>>> [email protected]> wrote:
>>>>>
>>>>> Hi Marc,
>>>>>
>>>>> I found everything is legal after double check the documentation you
>>>>> mentioned. Still not sure about where the problem is.
>>>>>
>>>>> On Thu, Aug 9, 2018 at 12:00 PM, Marc Hoffmann <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> -Dkey=value is how you add system properties. Take a look at our
>>>>>> documentation how to specify a JVM agent:
>>>>>>
>>>>>> https://www.jacoco.org/jacoco/trunk/doc/agent.html
>>>>>>
>>>>>> Regards,
>>>>>> -marc
>>>>>>
>>>>>>
>>>>>> On 9. Aug 2018, at 20:57, Immonnan <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>> Hi there,
>>>>>>
>>>>>> I am using Jacoco agent to generate code coverage report on my
>>>>>> Websphere server following this blog (
>>>>>> https://dzone.com/articles/verifying-end-to-end-test-code-coverage-using-jaco).
>>>>>>
>>>>>> To start the jacoco agent, I added the scripts to my jvm.options and the
>>>>>> server started successfully:
>>>>>>
>>>>>> -Djavaagent=<path to
>>>>>> jaccoc>/jacocoagent.jar=port=6300,destfile=jacoco-remote.exec,output=tcpserver,address=*
>>>>>> -DXshareclasses=none
>>>>>>
>>>>>> After that, I tried to do automation RestAPI tests and the tests have
>>>>>> passed. The tests are built with maven and successfully configured for
>>>>>> Jacoco. But there are no exec files generated on the server. I cannot
>>>>>> pull
>>>>>> jacoco data from my server neither.
>>>>>>
>>>>>> And here is the error:
>>>>>> [ERROR] Failed to execute goal
>>>>>> org.jacoco:jacoco-maven-plugin:0.8.1:dump (pull-test-data) on project
>>>>>> auto.root: Unable to dump coverage data: Connection refused (Connection
>>>>>> refused) -> [Help 1]
>>>>>>
>>>>>> I doubt that the jacoco agent is not running on my server. But I do
>>>>>> not find more solutions to this problem.
>>>>>>
>>>>>> Thanks for the help in advance.
>>>>>>
>>>>>> --
>>>>>> 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/9aac6d39-afc6-44c0-930c-226697bdf0e1%40googlegroups.com
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to a topic in
>>>>>> the Google Groups "JaCoCo and EclEmma Users" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/d/topic/jacoco/_n7hMYaRasE/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>> [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/jacoco/B864DF0A-5F7D-4B00-806F-BF18A4899FEA%40mountainminds.com
>>>>>>
>>>>>> <https://groups.google.com/d/msgid/jacoco/B864DF0A-5F7D-4B00-806F-BF18A4899FEA%40mountainminds.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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/CADhY4RedAqc9%3DamtAW8dtnd0umKfWZ9jnyAdMN--85DYGc8rgA%40mail.gmail.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/jacoco/CADhY4RedAqc9%3DamtAW8dtnd0umKfWZ9jnyAdMN--85DYGc8rgA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "JaCoCo and EclEmma Users" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/jacoco/_n7hMYaRasE/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jacoco/35661D2E-D8C4-4F73-ADC8-514C06CAAB70%40mountainminds.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/jacoco/35661D2E-D8C4-4F73-ADC8-514C06CAAB70%40mountainminds.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>> --
>>>> 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/CADhY4RcHOU%2BGdFcuuv1uDnN7ujLf3zTfQ9j9uwOQL%3DbKMOWzmQ%40mail.gmail.com
>>>>
>>>> <https://groups.google.com/d/msgid/jacoco/CADhY4RcHOU%2BGdFcuuv1uDnN7ujLf3zTfQ9j9uwOQL%3DbKMOWzmQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "JaCoCo and EclEmma Users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/jacoco/_n7hMYaRasE/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jacoco/4964BB54-B71F-4107-B50E-3957E5FE9D19%40mountainminds.com
>>>>
>>>> <https://groups.google.com/d/msgid/jacoco/4964BB54-B71F-4107-B50E-3957E5FE9D19%40mountainminds.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>
>> --
>> 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/CADhY4RcNTx0YXksJ3%3Dwn9gBSZvj9udSYQmGhngBRNTx2%3DK%2Bgsw%40mail.gmail.com
>>
>> <https://groups.google.com/d/msgid/jacoco/CADhY4RcNTx0YXksJ3%3Dwn9gBSZvj9udSYQmGhngBRNTx2%3DK%2Bgsw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "JaCoCo and EclEmma Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jacoco/_n7hMYaRasE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jacoco/6E570F5E-5F0C-4567-900F-0C8761E9391A%40mountainminds.com
>>
>> <https://groups.google.com/d/msgid/jacoco/6E570F5E-5F0C-4567-900F-0C8761E9391A%40mountainminds.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/d41cc8f5-3347-4a64-aceb-01a2f5fb3c47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.