Hi Ronald, 

these are probably two inner classes. The class files are named: 

        *
TokenRequestDTO$JaxbAccessorM_getPassword_setPassword_java_lang_String.class
        *
TokenRequestDTO$JaxbAccessorM_getSecret_setSecret_java_lang_String.class

Do you find these classes in your JAR? 

BTW: What is the reason that you use offline instrumentation? Why does
the JaCoCo agent not work for you? 

https://www.jacoco.org/jacoco/trunk/doc/agent.html 

Regards,
-marc 

On 2018-05-08 00:33, Ronald B. wrote:

> Hi Marc,
> 
> Thanks for the answer. 
> 
>> is that the full log output? Looks like you have two different exceptions 
>> here:
> 
> Yes,  that's all log output.
> 
>> 1) java.lang.IllegalStateException: Different class names ...
>> JaCoCo internally uses a CRC64 checksum as class ids. This exception 
>> indicates that the classes mentioned in the message actually result in the 
>> same hash.
> 
>> Can you please provide the two *.class files from your "fat.jar"?
> 
> There is only one class named TokenRequestDTO.class. There is only one class 
> named TokenRequestDTO.class. Why jacocoagent belives that two classes exits ? 
> 
> Files attached TokenRequestDTO(1).class prior to instrumentation and 
> TokenRequestDTO(2).class instrumented (Please, see attached classes) . Also I 
> would like to mention that lombok.jar is used for Getter and Setter purpose. 
> 
>> Also isn't there any stack trace for this exception?
> 
> That's all stack trace.
> 
>> 2) java.nio.channels.OverlappingFileLockException
>> This is strange. From the stack trace JaCoCo agent uses the file output but 
>> the command line shows you configured tcpserver.
> 
>> Also this typically happens when there are two JaCoCo agents configured from 
>> different versions at the same time.
> 
> Could you please provide me an example to illustrate this statement ? 
> 
>> Is there more going on that we can not see in the command line?
> 
> My bad. I sent the incorrect  command line for the exception that is 
> throwing.  This is the correct one. 
> 
> java -Djacoco-agent.output=file 
> -Djacoco-agent.destfile=/var/www/html/api/service/jacoco.exec 
> -Duser.timezone="UTC"  -XX:MaxPermSize=512M -Xmx4G --cp 
> /var/www/html/api/service/jacoco-0.8.1/lib/jacocoagent.jar:/var/www/html/api/service/build/libs/instrumented/service-1.0.0-SNAPSHOT-fat.jar
>  com.enterprise.custom.metadata.ServiceRun server config-service.yml
> 
> Hope all information gather would help you to understand better my issue.
> 
> Kind Regards,
> 
> Ronald
> 
> 2018-05-07 14:57 GMT-04:00 Marc Hoffmann <[email protected]>:
> Hi Ronald,
> 
> is that the full log output? Looks like you have two different exceptions 
> here:
> 
> 1) java.lang.IllegalStateException: Different class names ...
> 
> JaCoCo internally uses a CRC64 checksum as class ids. This exception 
> indicates that the classes mentioned in the message actually result in the 
> same hash. Can you please provide the two *.class files from your "fat.jar"? 
> Also isn't there any stack trace for this exception?
> 
> As a workaround you can exclude one of these classes during offline 
> instrumentation.
> 
> 2) java.nio.channels.OverlappingFileLockException
> 
> This is strange. From the stack trace JaCoCo agent uses the file output but 
> the command line shows you configured tcpserver. Also this typically happens 
> when there are two JaCoCo agents configured from different versions at the 
> same time. Is there more going on that we can not see in the command line?
> 
> Regards,
> -marc 
> 
> On 2018-05-04 23:19, [email protected] wrote:
> Hi,
> 
> I am trying to start an api-service using an instrumented jar in order
> to run automated test cases, when the service is trying to start with
> jacoco agent the next exception has been thrown:
> 
> INFO  []
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean:
> Creating Service {http://api.enterprise.com/soap}TokenService [1] from
> class com.enterprise.api.resource.so [2]ap.TokenService
> java.lang.IllegalStateException: Different class names
> com/enterprise/api/dto/TokenRequestDTO$JaxbAccessorM_getPassword_setPassword_java_lang_String
> and
> com/enterprise/api/dto/TokenRequestDTO$JaxbAccessorM_getSecret_setSecret_java_lang_String
> for id 3f788295c470c3f4.
> java.nio.channels.OverlappingFileLockException
> at sun.nio.ch [3].SharedFileLockTable.checkList(FileLockTable.java:255)
> at sun.nio.ch [3].SharedFileLockTable.add(FileLockTable.java:152)
> at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1063)
> at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
> at
> org.jacoco.agent.rt.internal_c13123e.output.FileOutput.openFile(FileOutput.java:69)
> at
> org.jacoco.agent.rt.internal_c13123e.output.FileOutput.writeExecutionData(FileOutput.java:53)
> at org.jacoco.agent.rt.internal_c13123e.Agent.shutdown(Agent.java:137)
> at org.jacoco.agent.rt.internal_c13123e.Agent$1.run(Agent.java:54)
> 
> Steps. Please, correct me if I am doing something wrong.
> 1. Instrument jar file
> 
> java -jar jacoco-0.8.1/lib/jacococli.jar instrument
> build/libs/service-1.0.0-SNAPSHOT-fat.jar --dest
> build/libs/instrumented
> 
> 2.Run it with JaCoCo agent in the class path
> 
> java -Djacoco-agent.output=tcpserver -Duser.timezone="UTC"
> -XX:MaxPermSize=512M -Xmx4G  -cp
> /var/www/html/api/service/jacoco-0.8.1/lib/jacocoagent.jar:/var/www/html/api/service/build/libs/instrumented/service-1.0.0-SNAPSHOT-fat.jar
> com.enterprise.custom.metadata.ServiceRun server config-service.yml
> 
> 3. When the server is trying to start the above exception mentioned is thrown.
> 
> Any idea what is whappening ? or Any hint ?
> 
> If you need any further information please let me know.
> 
> Thanks in advance. 
> -- 
> 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/UDD5eamWUXQ/unsubscribe [4].
> 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/b341a1e67363a27ee07b981a8f8847df%40mountainminds.com
>  [5]. 
> 
> For more options, visit https://groups.google.com/d/optout [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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/CAFLA3OBmCwc03UdkdWyODb%2BRN%2Ba_ZsvKV852vxNXVA0weSUiEw%40mail.gmail.com
[7].
For more options, visit https://groups.google.com/d/optout. 

  

Links:
------
[1] http://api.enterprise.com/soap%7DTokenService
[2] http://com.enterprise.api.resource.so
[3] http://sun.nio.ch
[4] https://groups.google.com/d/topic/jacoco/UDD5eamWUXQ/unsubscribe
[5]
https://groups.google.com/d/msgid/jacoco/b341a1e67363a27ee07b981a8f8847df%40mountainminds.com
[6] https://groups.google.com/d/optout
[7]
https://groups.google.com/d/msgid/jacoco/CAFLA3OBmCwc03UdkdWyODb%2BRN%2Ba_ZsvKV852vxNXVA0weSUiEw%40mail.gmail.com?utm_medium=email&amp;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/9fde9cd9660a9b905117f0eb540c3045%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to