java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;

Jenkins JIRA | Andrei Tuicu | 8 months ago
  1. 0

    We cannot perform a plugin release, because two injected tests fail in the Jenkins job[0]. The code can be found on github here[1]. *Steps to reproduce:* You can reproduce the problem, by cloning the repository and after running mvn clean install. For the first test ( org.jvnet.hudson.test.junit.FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite): We understand that there is a problem with Guava, but we have no idea how to fix it. Our plugin is indirectly dependent on it. For the second test (org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest.testCliSanity): We understand that there was a compatibility problem with Java 7 vs. 8. and it was resolved (see [2]), but even though we are using Jenkins 1.609.1, we are still seeing the problem, both locally with Java 7 and 8 and on the oficial Jenkins job. Can we get some guidance for these problems? Thank you, Andrei Tuicu [0] https://jenkins.ci.cloudbees.com/job/plugins/job/JiraTestResultReporter-plugin/ [1] https://github.com/jenkinsci/JiraTestResultReporter-plugin [2] https://issues.jenkins-ci.org/browse/JENKINS-23239 *Full stack trace:* Running InjectedTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 5.139 sec <<< FAILURE! - in InjectedTest org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest) Time elapsed: 0.007 sec <<< ERROR! java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache; at hudson.model.Queue.<init>(Queue.java:216) at jenkins.model.Jenkins.<init>(Jenkins.java:772) at hudson.model.Hudson.<init>(Hudson.java:83) at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500) at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330) at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.setUp(JellyTestSuiteBuilder.java:133) at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:49) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest) Time elapsed: 0.238 sec <<< ERROR! java.lang.IllegalStateException: second instance at jenkins.model.Jenkins.<init>(Jenkins.java:760) at hudson.model.Hudson.<init>(Hudson.java:83) at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500) at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330) at junit.framework.TestCase.runBare(TestCase.java:139) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:296) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

    Jenkins JIRA | 8 months ago | Andrei Tuicu
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
  2. 0

    [JENKINS-34129] Cannot release plugin due to injected tests failure - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
  3. 0

    We cannot perform a plugin release, because two injected tests fail in the Jenkins job[0]. The code can be found on github here[1]. *Steps to reproduce:* You can reproduce the problem, by cloning the repository and after running mvn clean install. For the first test ( org.jvnet.hudson.test.junit.FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite): We understand that there is a problem with Guava, but we have no idea how to fix it. Our plugin is indirectly dependent on it. For the second test (org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest.testCliSanity): We understand that there was a compatibility problem with Java 7 vs. 8. and it was resolved (see [2]), but even though we are using Jenkins 1.609.1, we are still seeing the problem, both locally with Java 7 and 8 and on the oficial Jenkins job. Can we get some guidance for these problems? Thank you, Andrei Tuicu [0] https://jenkins.ci.cloudbees.com/job/plugins/job/JiraTestResultReporter-plugin/ [1] https://github.com/jenkinsci/JiraTestResultReporter-plugin [2] https://issues.jenkins-ci.org/browse/JENKINS-23239 *Full stack trace:* Running InjectedTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 5.139 sec <<< FAILURE! - in InjectedTest org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest) Time elapsed: 0.007 sec <<< ERROR! java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache; at hudson.model.Queue.<init>(Queue.java:216) at jenkins.model.Jenkins.<init>(Jenkins.java:772) at hudson.model.Hudson.<init>(Hudson.java:83) at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500) at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330) at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.setUp(JellyTestSuiteBuilder.java:133) at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:49) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest) Time elapsed: 0.238 sec <<< ERROR! java.lang.IllegalStateException: second instance at jenkins.model.Jenkins.<init>(Jenkins.java:760) at hudson.model.Hudson.<init>(Hudson.java:83) at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500) at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330) at junit.framework.TestCase.runBare(TestCase.java:139) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:296) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

    Jenkins JIRA | 8 months ago | Andrei Tuicu
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Fails with maven 3.2.5

    GitHub | 2 years ago | jcgay
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
  6. 0

    Flume-ng-1.4.0安装及运行遇到问题总结 - panguoyuan的专栏 - 博客频道 - CSDN.NET

    csdn.net | 1 year ago
    java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;

      at hudson.model.Queue.<init>()
    2. Hudson
      Queue.<init>
      1. hudson.model.Queue.<init>(Queue.java:216)
      1 frame
    3. jenkins.model
      Jenkins.<init>
      1. jenkins.model.Jenkins.<init>(Jenkins.java:772)
      1 frame
    4. Hudson
      Hudson.<init>
      1. hudson.model.Hudson.<init>(Hudson.java:83)
      1 frame
    5. Hudson :: Test Framework
      GroupedTest.run
      1. org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:500)
      2. org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:330)
      3. org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.setUp(JellyTestSuiteBuilder.java:133)
      4. org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:49)
      4 frames
    6. JUnit
      JUnit38ClassRunner.run
      1. junit.framework.TestSuite.runTest(TestSuite.java:255)
      2. junit.framework.TestSuite.run(TestSuite.java:250)
      3. org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
      3 frames
    7. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      3 frames
    8. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      3 frames