-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Checked with git-client-3.11.1 tag and a later (fbbeb654a854d6a945513b736ea7b420ef147dde current as of today) master branch HEAD commit
[INFO] Maven Version: 3.8.6
[INFO] JDK Version: 17.0.3 normalized as: 17.0.3
[INFO] Java Vendor: Eclipse Adoptium
[INFO] OS Info: Arch: amd64 Family: windows Name: windows 10 Version: 10.0
Checked with git-client-3.11.1 tag and a later (fbbeb654a854d6a945513b736ea7b420ef147dde current as of today) master branch HEAD commit [INFO] Maven Version: 3.8.6 [INFO] JDK Version: 17.0.3 normalized as: 17.0.3 [INFO] Java Vendor: Eclipse Adoptium [INFO] OS Info: Arch: amd64 Family: windows Name: windows 10 Version: 10.0
While trying to locally mvn package the git-client plugin, running its self-tests over the course of an hour and a half (ouch!) I see a fair amount of tests failing to "initialize class com.google.inject.internal.cglib.core.$ReflectUtils":
[INFO] Results: [INFO] [ERROR] Errors: [ERROR] GitToolResolverTest.shouldResolveToolsOnMaster » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] GitToolTest » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] GitHostKeyVerificationConfigurationTest.testGitHostKeyVerificationConfigurationSavedBetweenSessions » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google .inject.internal.cglib.core.$ReflectUtils [ERROR] GitJenkinsRuleTest.testMockClient » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] GitToolConfiguratorJenkinsRuleTest.testDescribeGitTool » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] GitToolConfiguratorJenkinsRuleTest.testDescribeGitToolEmptyProperties » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$R eflectUtils [ERROR] JcascTest.roundTripTest » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] FailedTest » Reactor com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [INFO] [ERROR] Tests run: 2495, Failures: 0, Errors: 8, Skipped: 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE
This may be or not be a JVM distribution problem; at least per internet lore people had failed Jenkins start-up with similar stacktraces amended by changing/updating their JVM (8 at that time): https://stackoverflow.com/questions/68223201/unable-to-start-the-jenkins-server-getting-below-error
Other posts like https://issues.jenkins.io/browse/JENKINS-46620 suggest that in fact the dependency involved was part of Java 8 footprint, but not available in 9+ (confirmed problem for JDK 11 and 17 there).
Looking at recent CI builds of the plugin which all pass green, e.g. https://ci.jenkins.io/job/Plugins/job/git-client-plugin/job/master/798/display/redirect?page=tests I see that they run some JDK 11 and 17 on Linux, and JDK 8 on Windows, so maybe the platform is also a factor in all this, as well as that there are now many JDK vendors...
Kept the bug priority at default (Minor) since apparently this issue does not break the plugin delivery and usage; however it does make development cumbersome as contributors might have to "lockpick" the build platform setup to make it work - and to know to try that in the first place (that it is not necessarily a broken plugin, more so for their patches over it).
For the sake of completeness, one full stack trace from the failed test run is:
[ERROR] org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest.testDescribeGitTool Time elapsed: 1.362 s <<< ERROR! org.jvnet.hudson.reactor.ReactorException: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282) at jenkins.InitReactorRunner.run(InitReactorRunner.java:49) at jenkins.model.Jenkins.executeReactor(Jenkins.java:1162) at jenkins.model.Jenkins.<init>(Jenkins.java:960) at hudson.model.Hudson.<init>(Hudson.java:86) at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:703) at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:414) at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:607) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.lang.Thread.run(Thread.java:833) 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 hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:289) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) at java.base/java.lang.Class.newInstance(Class.java:645) at net.java.sezpoz.IndexItem.instance(IndexItem.java:181) at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:701) at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348) at hudson.ExtensionList.load(ExtensionList.java:380) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316) at hudson.ExtensionList.getComponents(ExtensionList.java:182) at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159) at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88) at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102) at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109) at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102) at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ... 1 more 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) ... 41 more
...and others seem identical.
More specific error heads in the test log:
### master branch [ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 51.534 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitHostKeyVerificationConfigurationTest [ERROR] org.jenkinsci.plugins.gitclient.GitHostKeyVerificationConfigurationTest.testGitHostKeyVerificationConfigurationSavedBetweenSessions Time elapsed: 51.433 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 58.165 s <<< FAILURE! - in hudson.plugins.git.GitToolResolverTest [ERROR] hudson.plugins.git.GitToolResolverTest.shouldResolveToolsOnMaster Time elapsed: 58.135 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 52.117 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitJenkinsRuleTest [ERROR] hudson.plugins.git.GitToolTest Time elapsed: 58.738 s <<< ERROR! [ERROR] org.jvnet.hudson.test.junit.FailedTest Time elapsed: 0.008 s <<< ERROR! org.jvnet.hudson.reactor.ReactorException: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] org.jenkinsci.plugins.gitclient.GitJenkinsRuleTest.testMockClient Time elapsed: 52.107 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.882 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.JcascTest [ERROR] org.jenkinsci.plugins.gitclient.JcascTest.roundTripTest Time elapsed: 0.873 s <<< ERROR! [ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 39.11 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest [ERROR] org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest.testDescribeGitToolEmptyProperties Time elapsed: 38.184 s <<< ERROR! [ERROR] org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest.testDescribeGitTool Time elapsed: 0.913 s <<< ERROR! ### release tag [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 95.715 s <<< FAILURE! - in hudson.plugins.git.GitToolResolverTest [ERROR] hudson.plugins.git.GitToolResolverTest.shouldResolveToolsOnMaster Time elapsed: 95.667 s <<< ERROR! org.jvnet.hudson.reactor.ReactorException: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils [ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 89.919 s <<< FAILURE! - in InjectedTest [ERROR] org.jvnet.hudson.test.junit.FailedTest Time elapsed: 0.011 s <<< ERROR! [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 83.397 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitHostKeyVerificationConfigurationTest [ERROR] org.jenkinsci.plugins.gitclient.GitHostKeyVerificationConfigurationTest.testGitHostKeyVerificationConfigurationSavedBetweenSessions Time elapsed: 83.23 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 83.55 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitJenkinsRuleTest [ERROR] org.jenkinsci.plugins.gitclient.GitJenkinsRuleTest.testMockClient Time elapsed: 83.529 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 95.484 s <<< FAILURE! - in hudson.plugins.git.GitToolTest [ERROR] hudson.plugins.git.GitToolTest Time elapsed: 95.484 s <<< ERROR! [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.61 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.JcascTest [ERROR] org.jenkinsci.plugins.gitclient.JcascTest.roundTripTest Time elapsed: 1.602 s <<< ERROR! [ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 63.901 s <<< FAILURE! - in org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest [ERROR] org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest.testDescribeGitToolEmptyProperties Time elapsed: 62.525 s <<< ERROR! [ERROR] org.jenkinsci.plugins.gitclient.GitToolConfiguratorJenkinsRuleTest.testDescribeGitTool Time elapsed: 1.362 s <<< ERROR!