Anyone get error "Invalid execution data file." when usng TCPServer output in java agent way?

1,056 views
Skip to first unread message

Conanin

unread,
Apr 19, 2013, 3:28:14 AM4/19/13
to jac...@googlegroups.com
I have tried to add below to JVM paramter, and start web application through Jboss,
 
-javaagent:/jacocoagent.jar=includes=com.xxx.xxx.*,output=tcpserver,address=xxx.xxx.xxx.xxx,port=xxxxx
 
address and port value is my web application host and port.
 
But below error is in the log:
java.io.IOException: Invalid execution data file.
STATUS server:org.jacoco.agent.rt_d6lax9.controller.TcpServerController:SystemErr:2013/04/19-10:16:45.001 CST:  at org.jacoco.agent.rt_d6lax9.core.data.ExecutionDataReader.read(ExecutionDataReader.java:82)
STATUS server:org.jacoco.agent.rt_d6lax9.controller.TcpServerController:SystemErr:2013/04/19-10:16:45.001 CST:  at org.jacoco.agent.rt_d6lax9.controller.TcpConnection.run(TcpConnection.java:59)
STATUS server:org.jacoco.agent.rt_d6lax9.controller.TcpServerController:SystemErr:2013/04/19-10:16:45.001 CST:  at org.jacoco.agent.rt_d6lax9.controller.TcpServerController$1.run(TcpServerController.java:63)
STATUS server:org.jacoco.agent.rt_d6lax9.controller.TcpServerController:SystemErr:2013/04/19-10:16:45.002 CST:  at java.lang.Thread.run(Thread.java:722)
 
Anyone get the situation?

Marc Hoffmann

unread,
Apr 19, 2013, 5:10:29 AM4/19/13
to jac...@googlegroups.com
How do you connect to the JaCoCo agent?

Note that this is a special protocol where you need a JaCoCo client.
One option is to use the dump Ant task:

http://www.eclemma.org/jacoco/trunk/doc/ant.html#dump

Also note that the host and port must be different from your web
applications endpoint, otherwise Jboss cannnot open its ports as it is
already blocked by JaCoCo.

Best regards,
-marc

haripr...@gmail.com

unread,
Feb 19, 2016, 6:29:28 AM2/19/16
to JaCoCo and EclEmma Users
Hi Conanin,

I am facing this same error now. Have you got this fixed? If so, could you please post the solution for it?

Note: my configuration is :
-javaagent:..../jacocoagent.jar=destfile=..../jacoco.exec,append=true,output=tcpserver,address=<hostanme>,port=<portnumber>,includes=*

Where, hostname and port number is my tomcat host name and port number, on which I launch my application.

Marc R. Hoffmann

unread,
Feb 21, 2016, 11:32:13 AM2/21/16
to jac...@googlegroups.com
> Where, hostname and port number is my tomcat host name and port number, on which I launch my application.

This looks wrong: JaCoCo uses its own protocol to dump execution data.
It will now work for HTTP. If you want to run JaCoCo agent in mode
tcpserver please use one of our dump tools (Maven, Ant, EclEmma, etc).
See documentation.

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages