question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gradle build failing in v6.1.1

See original GitHub issue

Describe the bug When attempting to run dependency check analyze using

./gradlew dependencyCheckAnalyze there are 2 tasks that fail:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':deployment:dependencyCheckAnalyze'.	
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)	
•••
Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.<init>(Ljava/lang/String;)V	
at org.owasp.dependencycheck.utils.Checksum.getChecksum(Checksum.java:101)
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':dependencyCheckAnalyze'.	
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)	
•••
Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.<init>(Ljava/lang/String;)V	
at org.owasp.dependencycheck.utils.Checksum.getChecksum(Checksum.java:101)

Version of dependency-check used The problem occurs using version 6.1.1 of the gradle plugin

Log file When reporting errors, 99% of the time log file output is required. Please post the log file as a gist and provide a link in the new issue.

Output displayed above. Let me know if you need additional information on the issue.

To Reproduce Steps to reproduce the behavior:

  1. Run the ./gradlew command in CLI
  2. View output of 2 failed jobs in gradle output

Expected behavior The gradle build should not break.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexquitiaquezcommented, Feb 25, 2021

OK, thanks Jeremy, so this should be right in next version 6.1.2, right? Update: forget it, I just realized your bugfix is already integrated to the next version 6.1.2, thanks Jeremy.

1reaction
alexquitiaquezcommented, Feb 25, 2021

Jeremy, is there an specific version of common-codec that is required? Could an override to force an specific version fix this problem? We have the problem in some API’s with this version 6.1.1, but in others it’s working just fine. Here the output for the case where it’s not working, only where commons-codec is present, thanks.


./gradlew buildEnviroment
....
+--- org.jfrog.buildinfo:build-info-extractor-gradle:4.4.18
|    +--- org.apache.ivy:ivy:2.2.0
|    +--- commons-logging:commons-logging:1.1.1 -> 1.2
|    +--- commons-io:commons-io:2.2 -> 2.8.0
|    +--- org.codehaus.groovy:groovy-all:2.4.7
|    +--- org.jfrog.buildinfo:build-info-extractor:2.7.8
|    |    +--- commons-logging:commons-logging:1.1.1 -> 1.2
|    |    +--- commons-io:commons-io:2.2 -> 2.8.0
|    |    +--- commons-lang:commons-lang:2.4
|    |    +--- org.jfrog.buildinfo:build-info-client:2.7.8
|    |    |    +--- commons-codec:commons-codec:1.8 -> 1.15
|    |    |    +--- commons-logging:commons-logging:1.1.1 -> 1.2
|    |    |    +--- commons-io:commons-io:2.2 -> 2.8.0
|    |    |    +--- org.jfrog.buildinfo:build-info-api:2.7.8
|    |    |    |    +--- commons-logging:commons-logging:1.1.1 -> 1.2
|    |    |    |    +--- commons-io:commons-io:2.2 -> 2.8.0
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.8.1 -> 2.12.1 (*)
|    |    |    |    +--- commons-lang:commons-lang:2.4
|    |    |    |    +--- com.google.guava:guava:18.0 -> 20.0
|    |    |    |    +--- com.thoughtworks.xstream:xstream:1.3.1
|    |    |    |    |    \--- xpp3:xpp3_min:1.1.4c
|    |    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.8.1 -> 2.12.1
|    |    |    +--- commons-lang:commons-lang:2.4
|    |    |    +--- com.google.guava:guava:18.0 -> 20.0
|    |    |    +--- org.apache.httpcomponents:httpclient:4.5.2
|    |    |    |    +--- org.apache.httpcomponents:httpcore:4.4.4 -> 4.4.5
|    |    |    |    +--- commons-logging:commons-logging:1.2
|    |    |    |    \--- commons-codec:commons-codec:1.9 -> 1.15
|    |    |    +--- org.apache.httpcomponents:httpcore:4.4.5
|    |    |    +--- com.thoughtworks.xstream:xstream:1.3.1 (*)
|    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.8.1 -> 2.12.1
|    |    +--- com.google.guava:guava:18.0 -> 20.0
|    |    \--- com.thoughtworks.xstream:xstream:1.3.1 (*)
|    \--- commons-lang:commons-lang:2.4
+--- org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1
|    \--- org.sonarsource.scanner.api:sonar-scanner-api:2.16.0.226
\--- org.owasp.dependencycheck:org.owasp.dependencycheck.gradle.plugin:6.1.1
     \--- org.owasp:dependency-check-gradle:6.1.1
          +--- org.owasp:dependency-check-core:6.1.1
          |    +--- org.anarres.jdiagnostics:jdiagnostics:1.0.6
          |    +--- org.whitesource:pecoff4j:0.0.2.1
          |    +--- org.apache.commons:commons-jcs-core:2.2.1
          |    |    \--- commons-logging:commons-logging:1.2
          |    +--- com.github.package-url:packageurl-java:1.2.0
          |    +--- us.springett:cpe-parser:2.0.2
          |    |    \--- org.slf4j:slf4j-api:1.7.30
          |    +--- com.vdurmont:semver4j:3.1.0
          |    +--- org.slf4j:slf4j-api:1.7.30
          |    +--- org.owasp:dependency-check-utils:6.1.1
          |    |    +--- commons-io:commons-io:2.8.0
          |    |    +--- org.apache.commons:commons-lang3:3.11
          |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.12.1 (*)
          |    |    +--- commons-codec:commons-codec:1.15
          |    |    \--- org.slf4j:slf4j-api:1.7.30
          
....


Read more comments on GitHub >

github_iconTop Results From Across the Web

upgrade gradle to v6.1.1 unable to find method - Stack Overflow
Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection ...
Read more >
Troubleshooting builds - Gradle User Manual
If your Gradle build fails before running any tasks, you may be encountering problems with your network configuration. When Gradle is unable to...
Read more >
Build.gradle always failed when testng dependency is added
Hi, As my tests were failed due to dependency with Text NG, i tried adding testng(with different versions) related URL in the dependency...
Read more >
deprecated gradle features were used in this build making it ...
It's just a deprecation warning giving you a heads-up that once you DO UPGRADE to 7.0 your build will stop working. In other...
Read more >
Gradle Docker Plugin User Guide & Examples - GitHub Pages
1.1. Benefits. There are various benefits for using this plugin: Seamless integration with the build tool Gradle and its DSL.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found