【发布时间】:2022-01-21 14:48:06
【问题描述】:
我正在尝试在 Jenkins 从机上运行 Selenium 脚本。由于一些漏洞,我无法使用 Java 1.8。我在从属代理上安装了 JDK 9.0.4,但是在尝试从 Jenkins 运行脚本时,出现以下异常
设置:
詹金斯 2.303.3
Java 版本:9.0.4
using settings config with name settings.xml
08:34:04 Replacing all maven server entries not found in credentials list is true
08:34:05 ERROR: Failed to parse POMs
08:34:05 java.io.IOException: Remote call on JNLP4-connect connection from VSXXXJENKINS16QA.FLEET.AD/XXXXXXfailed
08:34:05 at hudson.remoting.Channel.call(Channel.java:1005)
08:34:05 at hudson.FilePath.act(FilePath.java:1166)
08:34:05 at hudson.FilePath.act(FilePath.java:1155)
08:34:05 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
08:34:05 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
08:34:05 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
08:34:05 at hudson.model.Run.execute(Run.java:1888)
08:34:05 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
08:34:05 at hudson.model.ResourceController.execute(ResourceController.java:99)
08:34:05 at hudson.model.Executor.run(Executor.java:431)
08:34:05 Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
08:34:05 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2232)
08:34:05 at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
08:34:05 at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
08:34:05 at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
08:34:05 at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4834)
08:34:05 at com.google.inject.internal.FailableCache.get(FailableCache.java:48)
08:34:05 at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
08:34:05 at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:136)
08:34:05 at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:533)
08:34:05 at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:160)
08:34:05 at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
08:34:05 at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
08:34:05 at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
08:34:05 at com.google.inject.Guice.createInjector(Guice.java:96)
08:34:05 at com.google.inject.Guice.createInjector(Guice.java:73)
08:34:05 at com.google.inject.Guice.createInjector(Guice.java:62)
08:34:05 at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
08:34:05 at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
08:34:05 at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:168)
08:34:05 at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:166)
08:34:05 at hudson.maven.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:159)
08:34:05 at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:110)
08:34:05 at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:137)
08:34:05 at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:211)
08:34:05 at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1324)
08:34:05 at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1124)
08:34:05 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3338)
08:34:05 at hudson.remoting.UserRequest.perform(UserRequest.java:211)
08:34:05 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
08:34:05 at hudson.remoting.Request$2.run(Request.java:376)
08:34:05 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
08:34:05 at java.util.concurrent.FutureTask.run(Unknown Source)
08:34:05 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
08:34:05 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:34:05 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
08:34:05 at java.lang.Thread.run(Unknown Source)
08:34:05 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from VSPWJENKINS16QA.FLEET.AD/10.1.176.32:55500
08:34:05 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
08:34:05 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
08:34:05 at hudson.remoting.Channel.call(Channel.java:1001)
08:34:05 at hudson.FilePath.act(FilePath.java:1166)
08:34:05 at hudson.FilePath.act(FilePath.java:1155)
08:34:05 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
08:34:05 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
08:34:05 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
08:34:05 at hudson.model.Run.execute(Run.java:1888)
08:34:05 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
08:34:05 at hudson.model.ResourceController.execute(ResourceController.java:99)
08:34:05 at hudson.model.Executor.run(Executor.java:431)
08:34:05 Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
08:34:05 at com.google.inject.internal.cglib.reflect.$FastClassEmitter.<init>(FastClassEmitter.java:67)
08:34:05 at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:72)
08:34:05 at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
08:34:05 at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:216)
08:34:05 at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:64)
08:34:05 at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:204)
08:34:05 at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:54)
08:34:05 at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:159)
08:34:05 at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:90)
08:34:05 at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
08:34:05 at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
08:34:05 at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
08:34:05 at com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
08:34:05 at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
08:34:05 at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
08:34:05 at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
08:34:05 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
【问题讨论】:
-
您使用的是哪个版本的 Guice?