Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError running codacy gradle task #31

Closed
aschrijver opened this issue Jul 22, 2016 · 3 comments
Closed

NoSuchMethodError running codacy gradle task #31

aschrijver opened this issue Jul 22, 2016 · 3 comments

Comments

@aschrijver
Copy link

Description

When following the instructions to add codacy coverage support as described in https://github.com/codacy/codacy-coverage-reporter#setup a NoSuchMethodError exception occurs while running the codacy gradle task related to the netty-http-pipelining library used by the coverage plugin:

:graphql-consumer:uploadCoverageToCodacy
2016-07-22 12:16:45,767 [info]  com.codacy Parsing coverage data... 
2016-07-22 12:16:46,072 [info]  com.codacy Uploading coverage data... 
Exception in thread "main" java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.setHeader(Ljava/lang/String;Ljava/lang/Object;)V
        at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.construct(NettyAsyncHttpProvider.java:704)
        at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.buildRequest(NettyAsyncHttpProvider.java:657)
        at com.ning.http.client.providers.netty.NettyConnectListener$Builder.build(NettyConnectListener.java:145)
        at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1071)
        at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:940)
        at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:499)
        at play.api.libs.ws.ning.NingWSClient.executeRequest(NingWS.scala:42)
        at play.api.libs.ws.ning.NingWSRequest.execute(NingWS.scala:246)
        at play.api.libs.ws.ning.NingWSRequestHolder.execute(NingWS.scala:405)
        at play.api.libs.ws.WSRequestHolder$class.post(WS.scala:532)
        at play.api.libs.ws.ning.NingWSRequestHolder.post(NingWS.scala:361)
        at com.codacy.api.client.CodacyClient$$anonfun$post$1.apply(CodacyClient.scala:59)
        at com.codacy.api.client.CodacyClient$$anonfun$post$1.apply(CodacyClient.scala:53)
        at com.codacy.api.client.CodacyClient.withWSClient(CodacyClient.scala:108)
        at com.codacy.api.client.CodacyClient.post(CodacyClient.scala:53)
        at com.codacy.api.service.CoverageServices.sendReport(CoverageServices.scala:14)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1$$anonfun$apply$1$$anonfun$apply$2.apply(CodacyCoverageReporter.scala:111)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1$$anonfun$apply$1$$anonfun$apply$2.apply(CodacyCoverageReporter.scala:98)
        at com.codacy.CodacyCoverageReporter$.com$codacy$CodacyCoverageReporter$$transform(CodacyCoverageReporter.scala:138)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1$$anonfun$apply$1.apply(CodacyCoverageReporter.scala:97)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1$$anonfun$apply$1.apply(CodacyCoverageReporter.scala:97)
        at com.codacy.parsers.CoverageParserFactory$$anonfun$withCoverageReport$1.apply(CoverageParser.scala:36)
        at com.codacy.parsers.CoverageParserFactory$$anonfun$withCoverageReport$1.apply(CoverageParser.scala:34)
        at scala.Option.map(Option.scala:146)
        at com.codacy.parsers.CoverageParserFactory$.withCoverageReport(CoverageParser.scala:33)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1.apply(CodacyCoverageReporter.scala:97)
        at com.codacy.CodacyCoverageReporter$$anonfun$coverageWithTokenAndCommit$1.apply(CodacyCoverageReporter.scala:89)
        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1$$anonfun$apply$2.apply(FileHelper.scala:19)
        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1$$anonfun$apply$2.apply(FileHelper.scala:17)
        at scala.Option.map(Option.scala:146)
        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1.apply(FileHelper.scala:17)
        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1.apply(FileHelper.scala:16)
        at com.codacy.api.helpers.FileHelper$$anonfun$withCommit$2.apply(FileHelper.scala:32)
        at com.codacy.api.helpers.FileHelper$$anonfun$withCommit$2.apply(FileHelper.scala:31)
        at scala.Option.map(Option.scala:146)
        at com.codacy.api.helpers.FileHelper$.withCommit(FileHelper.scala:31)
        at com.codacy.api.helpers.FileHelper$.withTokenAndCommit(FileHelper.scala:16)
        at com.codacy.CodacyCoverageReporter$.coverageWithTokenAndCommit(CodacyCoverageReporter.scala:89)
        at com.codacy.CodacyCoverageReporter$.codacyCoverage(CodacyCoverageReporter.scala:122)
        at com.codacy.CodacyCoverageReporter$.main(CodacyCoverageReporter.scala:55)
        at com.codacy.CodacyCoverageReporter.main(CodacyCoverageReporter.scala)
> Building 67% > :graphql-consumer:uploadCoverageToCodacy

See also: engagingspaces/vertx-graphql-service-discovery#1

Reproducer:

Checkout the code in branch https://github.com/engagingspaces/vertx-graphql-service-discovery/tree/issue-1/codacy-code-coverage and perform a gradle clean build uploadCoverageToCodacy.

@pedrorijo91
Copy link
Contributor

Hey @aschrijver

It may be some conflict when using gradle. Have you tried to run the commands on https://github.com/codacy/codacy-coverage-reporter#setup outside the gradle task?

@aschrijver
Copy link
Author

Thanks @pedrorijo91
No I did not. I currently lack the time to spend on this, and skipped coverage report altogether. If you want you can close this issue. I still have a local issue on my backlog..

@pedrorijo91
Copy link
Contributor

have a look at #35, it may solve your problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants