Hi Dhivya,
what exactly do you want to do? Why do you need tcpserver/tcpclient as
output mode?
You can't connect JaCoCo agents to each other.
Regards,
-marc
On 2019-07-10 17:00, [email protected] wrote:
Hi Team,
I am trying to run my JVM in TCP client mode and my TCP server is
listening.
Below is the configuration setup.
Server End:(Configured in my eclipse)
-javaagent:jacoco-0.8.4\lib\jacocoagent.jar=port=9005,output=tcpserver,address=*
Client End:(In my cmd)
SET
_JAVA_OPTIONS=-javaagent:jacoco-0.8.4\lib\jacocoagent.jar=port=9005,output=tcpclient,address=127.0.0.1
Problem:When ever i try to execute or compile my code it throws the
below error in the clien end.
java.net.ConnectException: Connection refused: connect
at java.base/java.net.PlainSocketImpl.connect0(Native Method)
at
java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)
at
java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at
java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at
java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at
java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:591)
at java.base/java.net.Socket.connect(Socket.java:540)
at java.base/java.net.Socket.<init>(Socket.java:436)
at java.base/java.net.Socket.<init>(Socket.java:213)
at
org.jacoco.agent.rt.internal_035b120.output.TcpClientOutput.createSocket(TcpClientOutput.java:85)
at
org.jacoco.agent.rt.internal_035b120.output.TcpClientOutput.startup(TcpClientOutput.java:49)
at
org.jacoco.agent.rt.internal_035b120.Agent.startup(Agent.java:122)
at
org.jacoco.agent.rt.internal_035b120.Agent.getInstance(Agent.java:50)
at
org.jacoco.agent.rt.internal_035b120.PreMain.premain(PreMain.java:49)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
java.lang.NullPointerException
at
org.jacoco.agent.rt.internal_035b120.output.TcpClientOutput.writeExecutionData(TcpClientOutput.java:72)
at
org.jacoco.agent.rt.internal_035b120.Agent.shutdown(Agent.java:137)
at
org.jacoco.agent.rt.internal_035b120.Agent$1.run(Agent.java:54)
I am not sure whether I am configuring it properly.
Guide me to move further.
Thanks
-Dhivya
--
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/affdbbd9c64203c9d5d53ab8fc997590%40mountainminds.com.