The ES related jar package version 7.12 was introduced locally, but the editing was still recognized by Diffblue Cover as a damaged jar package. I need to delete the local ESjar package every time. Only then can the editing be successful. What is the reason?
This is the jar coordinate I introduced
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>7.12.0</version>
<scope>compile</scope>
</dependency>
error log:
18:34:44.322 [INFO] [Creating] org/elasticsearch/cluster/ClusterState seems to be invalid; in particular readFrom(StreamInput, DiscoveryNode) could not be analysed. This is likely due to a broken jar file. Try replacing this class with a valid version.
18:34:44.358 [INFO] [Creating] org/elasticsearch/cluster/metadata/Metadata seems to be invalid; in particular readFrom(StreamInput) could not be analysed. This is likely due to a broken jar file. Try replacing this class with a valid version.
18:34:47.147 [INFO] [Creating] org/elasticsearch/cluster/routing/RoutingTable seems to be invalid; in particular readFrom(StreamInput) could not be analysed. This is likely due to a broken jar file. Try replacing this class with a valid version.
Hello @toutou_Xiao ,
Welcome to our Diffblue Forum.
Sorry to hear you have encountered an issue, but thank you for reaching out.
If you are comfortable sharing with us the Diffblue Cover support logs where you encounter this behaviour, this would be much appreciated and may provide additional insights. To share the support logs with us you can simply email these to our support address (support@diffblue.com) .
The support log files can be located using the dropdown menu item from within the Cover Plugin:
You can also navigate directly to the log location:
- Windows: %USERPROFILE%\AppData\Local\Temp\diffblue\log
- Linux: /tmp/diffblue/log
- macOS: $TMPDIR/diffblue/log
Information on this can also be found on our documentation website: Cover Plugin Support Logs
Separate to sharing the log files, a couple of troubleshooting actions to trying:
-
Clear Diffblue Cover Plugin environment cache
Within IntelliJ navigate to the “Diffblue” menu option > select the option to clear cache.
Rerun Cover to see if the same behaviour is experienced.
-
Verify Jar integrity
Check the jar is a valid zip: jar tf ~/.m2/…/elasticsearch-7.12.0.jar (should list contents)
Or: unzip -t elasticsearch-7.12.0.jar (should say OK)
Compare size/hash against Maven Central (or force a fresh download with mvn -U Dmaven.repo.local=…)
-
Clear Maven markers
Delete both the jar and its checksum/marker files in the same folder (*.sha1, *.md5, *.lastUpdated) then re-run with mvn -U.
If you’re behind a proxy repo, try downloading once directly from Maven Central to see if the proxy is the source.
Please do let us know how you progress with the above.
Kind Regards,
Shaun