Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67143

maveJob does not work with JDK 17 (Docker)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins 2.303.3
      Jenkins Remoting 4.11.1
      JDK 17.0.1 (openjdk:17-jdk-buster)
      Maven 3.8.3

      Hello there,

      I'm trying to get our Jenkins Agents to run with JDK 17, while the Agent itself and our freestyle jobs works as expected, I have trouble to get our Maven Jobs to work.

       

      It seems that the problem is related to the maven-plugin for jenkins and OpenJDK 17 as runtime.

      We are using a custom Image for the agent, based on openjdk:17-jdk-buster with the configuration from jenkinsci/docker-agent and jenkinsci/docker-inbound-agent to get the agent itself up and running. 

       Maven is installed to /usr/share/maven by unpacking and downloading the tar.gz. I also added the Maven installation in "/configureTools" menu.

       

      Our JDK 15 image is working fine.

       

      If required I can try to provide a reduced version of our Dockerfile in attempt to help to reproduce the issue.

       

      The Stacktrace:

      Parsing POMs
      ERROR: Failed to parse POMs
      java.io.IOException: Remote call on maven-jdk17-0027r1rf1cv3o failed
      	at hudson.remoting.Channel.call(Channel.java:1005)
      	at hudson.FilePath.act(FilePath.java:1166)
      	at hudson.FilePath.act(FilePath.java:1155)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
      	at hudson.model.Run.execute(Run.java:1888)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      	at hudson.model.ResourceController.execute(ResourceController.java:99)
      	at hudson.model.Executor.run(Executor.java:431)
      Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2232)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
      	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
      	at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4834)
      	at com.google.inject.internal.FailableCache.get(FailableCache.java:48)
      	at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
      	at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:136)
      	at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:533)
      	at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:160)
      	at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
      	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
      	at com.google.inject.Guice.createInjector(Guice.java:96)
      	at com.google.inject.Guice.createInjector(Guice.java:73)
      	at com.google.inject.Guice.createInjector(Guice.java:62)
      	at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
      	at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
      	at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168)
      	at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166)
      	at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:159)
      	at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:110)
      	at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:137)
      	at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:211)
      	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1324)
      	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1124)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3338)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:376)
      	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to maven-jdk17-0027r1rf1cv3o
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      		at hudson.remoting.Channel.call(Channel.java:1001)
      		at hudson.FilePath.act(FilePath.java:1166)
      		at hudson.FilePath.act(FilePath.java:1155)
      		at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
      		at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
      		at hudson.model.Run.execute(Run.java:1888)
      		at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      		at hudson.model.ResourceController.execute(ResourceController.java:99)
      		at hudson.model.Executor.run(Executor.java:431)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
      	at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:67)
      	at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:72)
      	at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
      	at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:216)
      	at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:64)
      	at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:204)
      	at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:54)
      	at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:159)
      	at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:90)
      	at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
      	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
      	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
      	at com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
      	... 34 more
      Finished: FAILURE
      

            Unassigned Unassigned
            dodge Kay Janssen
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: