Comments (12)
Did you download the jar directly from maven?
from codacy-coverage-reporter.
If you follow the steps here: https://github.com/codacy/codacy-coverage-reporter#setup
it should not happen
from codacy-coverage-reporter.
I did download the jar directly from maven, and I did followed the instructions you pointed out.
The only difference is that I used codacy-coverage-reporter-1.0.13.jar
.
Your doc refer to codacy-coverage-reporter-assembly-1.0.5.jar
though. So, when I use it, I get a different error, as seen below.
Error: Could not find or load main class com.codacy.CodacyCoverageReporter
from codacy-coverage-reporter.
If I do
wget https://github.com/codacy/codacy-coverage-reporter/releases/download/1.0.13/codacy-coverage-reporter-assembly-1.0.5.jar
java -cp codacy-coverage-reporter-assembly-1.0.5.jar com.codacy.CodacyCoverageReporter -l Java -r jacoco.xml
in a clean machine if requests my token so it is finding the class. Not sure what can be the problem. Do you have any aditional details? What are you exactly doing?
from codacy-coverage-reporter.
The previous error I got when using a different jar codacy-coverage-reporter-1.0.13.jar
. When I use codacy-coverage-reporter-assembly-1.0.5.jar
though, I get [error] com.codacy Failed to upload report: Not Found
. See all my commands below.
[facarvalho@LM-aun-00874876 resteasy-spring-boot]$ ls resteasy-spring-boot-starter/target/site/cobertura/coverage.xml
resteasy-spring-boot-starter/target/site/cobertura/coverage.xml
[facarvalho@LM-aun-00874876 resteasy-spring-boot]$ java -cp codacy-coverage-reporter-assembly-1.0.5.jar com.codacy.CodacyCoverageReporter -l Java -r ./resteasy-spring-boot-starter/target/site/cobertura/coverage.xml --projectToken XXXXXXXXXX
2017-04-19 11:43:54,297 [info] com.codacy Parsing coverage data...
2017-04-19 11:43:54,573 [info] com.codacy Uploading coverage data...
2017-04-19 11:43:55,815 [error] com.codacy Failed to upload report: Not Found
from codacy-coverage-reporter.
Weird. I just noticed the jar in the 1.0.13 release is 1.0.5 and that might be the actual problem. Can you try with https://secure.central.sonatype.com/maven2/com/codacy/codacy-coverage-reporter/1.0.13/codacy-coverage-reporter-1.0.13-assembly.jar ?
from codacy-coverage-reporter.
I didn't work neither. I got: [error] com.codacy Failed to upload report: Not Found
My full command and output below:
[facarvalho@LM-aun-00874876 resteasy-spring-boot]$ ls -l ./resteasy-spring-boot-starter/target/site/cobertura/coverage.xml
-rw-r--r-- 1 facarvalho 110111498 45591 Apr 17 10:45 ./resteasy-spring-boot-starter/target/site/cobertura/coverage.xml
[facarvalho@LM-aun-00874876 resteasy-spring-boot]$ java -cp codacy-coverage-reporter-1.0.13-assembly.jar com.codacy.CodacyCoverageReporter -l Java -r ./resteasy-spring-boot-starter/target/site/cobertura/coverage.xml --projectToken XXXXXXXX
2017-04-20 11:18:28,353 [info] com.codacy Parsing coverage data...
2017-04-20 11:18:28,680 [info] com.codacy Uploading coverage data...
2017-04-20 11:18:30,024 [error] com.codacy Failed to upload report: Not Found
from codacy-coverage-reporter.
I just updated one of our projects to use this instead of JPM.
https://github.com/codacy/codacy-api-java/blob/master/circle.yml#L7
Are you exporting the CODACY_PROJECT_TOKEN in the environment?
from codacy-coverage-reporter.
Yes, I am CODACY_PROJECT_TOKEN in the environment. Keep in mind that before JPM broken codacy worked perfectly for me.
from codacy-coverage-reporter.
I got the same com.codacy Failed to upload report: Not Found
error after doing what you said.
I am starting to wonder if my token is bad.
What does that error message mean exactly? Does it mean the token is bad?
Also, what is the token for? I am asking because even though I get that error message, I can tell still my coverage data gets uploaded.
from codacy-coverage-reporter.
Usually either the token is bad or the endpoint is wrong.
Old versions will have outdated endpoints since we changed some time ago.
Just to confirm, you are using the token generated in the project settings > integration > project token?
from codacy-coverage-reporter.
The issue is finally solved. So, actually there were two issues here:
- The first was how to get the correct jar and run it properly, that was causing first
java.lang.NoClassDefFoundError: scala/Product
and laterError: Could not find or load main class com.codacy.CodacyCoverageReporter
, depending on the jar used. - There was in fact a problem with the token I had in the environment variable at my CI environment. That was causing
com.codacy Failed to upload report: Not Found
. That started to happen only after issue 1 was solved, but before we talked about how the token is used, we hadn't realized that.
I changed the way to get the codacy report tool (as seen here) and reset the codacy token in the CI environment and now everything works.
Thanks a lot Rodrigo for your time and getting this solved.
Feel free to close this issue.
from codacy-coverage-reporter.
Related Issues (20)
- [CY-5947] Multiple vulnerabilities found in published Docker image HOT 3
- [CY-5948] Add a Security Policy HOT 2
- [CY-5949] Multiple vulnerabilities found in compiled java jar HOT 2
- [CY-5950] Adopt a software composition analysis solution HOT 3
- [DOCS-381] Add troubleshooting for "Failed to upload coverage report ... connect timed out" HOT 9
- [DOCS-382] Clarify required account API token permissions for uploading coverage HOT 1
- [DOCS-389] Update Gradle task examples for uploading coverage to Codacy HOT 1
- [CY-6234] Wrong checksum for codacy-coverage-reporter-linux 13.9.14 in GithubAction HOT 5
- [CY-6444] 13:10:10 breaks on Heroku CI HOT 4
- [CY-6692] Feature Request: Support `--codacy-reporter-version` argument HOT 2
- [TS-193] Feature request: Glob pattern for reports HOT 1
- [TS-231] Can't guess the report language HOT 4
- [TS-264] Glob report only uploads first file HOT 2
- [TS-511] 13.13.3 is broken HOT 7
- [TS-548] Support running `get.sh` script on ARM machines HOT 1
- [TS-549] Exception in thread "main" java.lang.NumberFormatException: For input string: "18446744073709551615" HOT 8
- [TS-675] Failed to upload coverage report when using version 13.13.14 HOT 2
- Coverage upload is always skipped when enabling `skip` in CircleCI Orb TCE-805 HOT 2
- [TCE-818] Calling coverage-reporter with final flag HOT 2
- Will the coverage upload be skipped only if `--skip` or `-s` is passed in? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codacy-coverage-reporter.