jenkinsci / google-oauth-plugin

This plugin implements the OAuth Credentials interfaces to surface Google Service Account credentials to Jenkins.
https://plugins.jenkins.io/google-oauth-plugin/
Apache License 2.0
37 stars 56 forks source link

Warning logs on Jenkins Start: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl #200

Closed bewczardski closed 12 months ago

bewczardski commented 1 year ago

Jenkins and plugins versions report

Environment ```Jenkins: 2.414.2 OS: Linux - 5.10.102.1-microsoft-standard-WSL2 Java: 11.0.20.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 credentials:1293.vff276f713473 google-oauth-plugin:1.318.vb_39c5db_e3041 jackson2-api:2.15.2-350.v0c2f3f8fc595 javax-activation-api:1.2.0-6 jaxb:2.3.8-1 oauth-credentials:0.646.v02b_66dc03d2e snakeyaml-api:2.2-111.vc6598e30cc65 structs:325.vcb_307d2a_2782 ```

After installing Google OAuth Credentials plugin, the following warnings can be found in the Jenkins log.


2023-10-13 17:57:54.767+0000 [id=64]    INFO    h.model.UpdateCenter$DownloadJob#run: Installation successful: google-oauth-plugin
2023-10-13 17:57:54.767+0000 [id=64]    INFO    h.m.UpdateCenter$CompleteBatchJob#run: Completing installing of plugin batch…
2023-10-13 17:57:54.877+0000 [id=64]    WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
        at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2340)
        at java.base/java.util.Optional.orElseThrow(Optional.java:408)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2340)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt```

### What Operating System are you using (both controller, and any agents involved in the problem)?

I've testing with 2.375.4 and 2.414.2 docker images.

### Reproduction steps

1. Start a new Jenkins Instance
`docker run --rm -p 8080:8080 -p 50000:50000 -v jenkins_oauth_test:/var/jenkins_home --env JAVA_OPTS=-Djenkins.install.runSetupWizard=false jenkins/jenkins:2.414.2-lts-jdk11`
2. Install the Google OAuth Credentials plugin (v1.318.vb_39c5db_e3041 at the time of the submit)
3. View Jenkins logs after install/restart Warnings will appear.

### Expected Results

The Google OAuth Credentials plugin should be loaded without any warnings.

### Actual Results

2023-10-13 17:57:54.877+0000 [id=64]    WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
        at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2340)
        at java.base/java.util.Optional.orElseThrow(Optional.java:408)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2340)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt

### Anything else?

I've tracked this down to the dependency update of OAuth Credentials in: https://github.com/jenkinsci/google-oauth-plugin/pull/187

Once the OAuth Credentials are updated to v0.646.v02b_66dc03d2e the warnings will appear.
This will occur for any release of Google OAuth Credentials greater than v1.0.11
chris-lee-lb commented 1 year ago

+1 for this issue when we setup gcp credentials with Jenkins Configuration As Code Plugin.

However, our case is a bit different, in fact, the credentials were created successfully, but the credential IDs were all changed to random uuid (which should be the same as the project id / name), so some of our jenkins jobs can't be executed properly.

PS : we've workaround with rollback to 1.0.11

bewczardski commented 1 year ago

I'm assuming this is the same problem reported in https://github.com/jenkinsci/google-oauth-plugin/issues/198

PatrikSchalin commented 1 year ago

I'm experiencing similar warnings guessing the root cause is the same.

Environment ```text Jenkins: 2.428 OS: Linux - 4.14.305-227.531.amzn2.x86_64 Java: 17.0.8.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- Office-365-Connector:4.20.0 amazon-ecr:1.114.vfd22430621f5 analysis-model-api:11.10.0 ansicolor:1.0.4 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 atlassian-jira-software-cloud:2.0.9 authentication-tokens:1.53.v1c90fd9191a_b_ aws-credentials:218.v1b_e9466ec5da_ aws-java-sdk:1.12.529-406.vdeff15e5817d aws-java-sdk-cloudformation:1.12.529-406.vdeff15e5817d aws-java-sdk-codebuild:1.12.529-406.vdeff15e5817d aws-java-sdk-ec2:1.12.529-406.vdeff15e5817d aws-java-sdk-ecr:1.12.529-406.vdeff15e5817d aws-java-sdk-ecs:1.12.529-406.vdeff15e5817d aws-java-sdk-efs:1.12.529-406.vdeff15e5817d aws-java-sdk-elasticbeanstalk:1.12.529-406.vdeff15e5817d aws-java-sdk-iam:1.12.529-406.vdeff15e5817d aws-java-sdk-kinesis:1.12.529-406.vdeff15e5817d aws-java-sdk-logs:1.12.529-406.vdeff15e5817d aws-java-sdk-minimal:1.12.529-406.vdeff15e5817d aws-java-sdk-secretsmanager:1.12.529-406.vdeff15e5817d aws-java-sdk-sns:1.12.529-406.vdeff15e5817d aws-java-sdk-sqs:1.12.529-406.vdeff15e5817d aws-java-sdk-ssm:1.12.529-406.vdeff15e5817d aws-secrets-manager-credentials-provider:1.213.vca_3f37306fed aws-secrets-manager-secret-source:1.72.v61781b_35c542 basic-branch-build-strategies:81.v05e333931c7d bitbucket:223.vd12f2bca5430 blackduck-detect:9.0.0 blueocean:1.27.8 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.27.8 blueocean-commons:1.27.8 blueocean-config:1.27.8 blueocean-core-js:1.27.8 blueocean-dashboard:1.27.8 blueocean-display-url:2.4.2 blueocean-events:1.27.8 blueocean-git-pipeline:1.27.8 blueocean-github-pipeline:1.27.8 blueocean-i18n:1.27.8 blueocean-jira:1.27.8 blueocean-jwt:1.27.8 blueocean-personalization:1.27.8 blueocean-pipeline-api-impl:1.27.8 blueocean-pipeline-editor:1.27.8 blueocean-pipeline-scm-api:1.27.8 blueocean-rest:1.27.8 blueocean-rest-impl:1.27.8 blueocean-web:1.27.8 bootstrap5-api:5.3.2-1 bouncycastle-api:2.29 branch-api:2.1128.v717130d4f816 build-monitor-plugin:1.14-745.ve2023a_305f40 build-timeout:1.31 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloudbees-bitbucket-branch-source:848.v42c6a_317eda_e cloudbees-disk-usage-simple:182.v62ca_0c992a_f3 cloudbees-folder:6.848.ve3b_fd7839a_81 command-launcher:107.v773860566e2e commons-httpclient3-api:3.1-3 commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.10.0-78.v3e7b_ea_d5a_fe1 config-file-provider:959.vcff671a_4518b_ configuration-as-code:1714.v09593e830cfa configuration-as-code-groovy:1.1 credentials:1293.vff276f713473 credentials-binding:636.v55f1275c7b_27 dark-theme:372.v79b_02c754b_29 data-tables-api:1.13.6-5 display-url-api:2.200.vb_9327d658781 docker-commons:439.va_3cb_0a_6a_fb_29 docker-workflow:572.v950f58993843 durable-task:523.va_a_22cf15d5e0 ec2:1628.v6d7b_fc58b_a_1d echarts-api:5.4.0-6 email-ext:2.102 extended-read-permission:53.v6499940139e5 favorite:2.4.3 font-awesome-api:6.4.2-1 forensics-api:2.3.0 gatling:1.3.0 git:5.2.0 git-changelog:3.34 git-client:4.5.0 git-forensics:2.0.0 git-parameter:0.9.19 git-server:99.va_0826a_b_cdfa_d github:1.37.3 github-api:1.316-451.v15738eef3414 github-branch-source:1741.va_3028eb_9fd21 google-oauth-plugin:1.318.vb_39c5db_e3041 google-play-android-publisher:4.2 gradle:2.8.2 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.32 http_request:1.18 instance-identity:173.va_37c494ec4e5 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.3-366.vfe8d1fa_f8c87 jacoco:3.3.5 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jdk-tool:73.vddf737284550 jenkins-design-language:1.27.8 jersey2-api:2.40-1 jira:3.11 jira-steps:2.0.165.v8846cf59f3db jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.18-1 jquery:1.12.4-1 jquery3-api:3.7.1-1 jsch:0.2.8-65.v052c39de79b_2 junit:1240.vf9529b_881428 kpp-management-plugin:105.v767485951b_d2 ldap:701.vf8619de9160a_ lockable-resources:1185.v0c528656ce04 mailer:463.vedf8358e006b_ mapdb-api:1.0.9-28.vf251ce40855d matrix-auth:3.2.1 matrix-project:818.v7eb_e657db_924 mercurial:1260.vdfb_723cdcc81 metrics:4.2.18-442.v02e107157925 mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_ mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_ monitoring:1.95.0 node-iterator-api:49.v58a_8b_35f8363 oauth-credentials:0.646.v02b_66dc03d2e okhttp-api:4.11.0-157.v6852a_a_fa_ec11 pam-auth:1.10 pipeline-aws:1.43 pipeline-build-step:505.v5f0844d8d126 pipeline-github-lib:42.v0739460cda_c4 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-groovy-lib:689.veec561a_dee13 pipeline-input-step:477.v339683a_8d55e pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2144.v077a_d1928a_40 pipeline-model-definition:2.2144.v077a_d1928a_40 pipeline-model-extensions:2.2144.v077a_d1928a_40 pipeline-rest-api:2.33 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2144.v077a_d1928a_40 pipeline-stage-view:2.33 pipeline-utility-steps:2.16.0 plain-credentials:143.v1b_df8b_d3b_e48 plugin-util-api:3.6.0 powershell:2.1 prism-api:1.29.0-8 pubsub-light:1.17 resource-disposer:0.23 saml:4.429.v9a_781a_61f1da_ scm-api:676.v886669a_199a_a_ script-security:1275.v23895f409fb_d slack:684.v833089650554 snakeyaml-api:2.2-111.vc6598e30cc65 sse-gateway:1.26 ssh-agent:333.v878b_53c89511 ssh-credentials:308.ve4497b_ccd8f4 ssh-slaves:2.916.vd17b_43357ce4 sshd:3.312.v1c601b_c83b_0e structs:325.vcb_307d2a_2782 subversion:2.17.3 swarm:3.40 theme-manager:215.vc1ff18d67920 timestamper:1.26 token-macro:384.vf35b_f26814ec trilead-api:2.84.v72119de229b_7 variant:60.v7290fc0eb_b_cd warnings-ng:10.5.0 workflow-aggregator:596.v8c21c963d92d workflow-api:1283.v99c10937efcb_ workflow-basic-steps:1042.ve7b_140c4a_e0c workflow-cps:3802.vd42b_fcf00b_a_c workflow-durable-task-step:1289.v4d3e7b_01546b_ workflow-job:1348.v32a_a_f150910e workflow-multibranch:756.v891d88f2cd46 workflow-scm-step:415.v434365564324 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:865.v43e78cc44e0d ws-cleanup:0.45 xcode-plugin:2.0.17-565.v1c48051d46ef ```

OS: Amazon Linux

jenkins_master | 2023-10-18 06:35:29.120+0000 [id=30]   WARNING hudson.ExtensionFinder$Sezpoz#scout: Failed to scout com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master |    at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master |    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master |    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master |    at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:770)
jenkins_master |    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338)
jenkins_master |    at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master |    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master |    at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master |    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master |    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master |    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master |    at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:30.517+0000 [id=30]   WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master |    at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master |    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master |    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master |    at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ExtensionFinder$GuiceFinder.refreshExtensionAnnotations(ExtensionFinder.java:301)
jenkins_master |    at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:262)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master |    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master |    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master |    at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master |    at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master |    at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master |    at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master |    at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master |    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master |    at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master |    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master |    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master |    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master |    at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:30.655+0000 [id=30]   WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master |    at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master |    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master |    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master |    at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:277)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master |    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master |    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master |    at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master |    at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master |    at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master |    at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master |    at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master |    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master |    at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master |    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master |    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master |    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master |    at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:32.340+0000 [id=30]   WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master |    at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master |    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master |    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master |    at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:566)
jenkins_master |    at com.google.inject.AbstractModule.configure(AbstractModule.java:64)
jenkins_master |    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:426)
jenkins_master |    at com.google.inject.spi.Elements.getElements(Elements.java:113)
jenkins_master |    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
jenkins_master |    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
jenkins_master |    at com.google.inject.Guice.createInjector(Guice.java:87)
jenkins_master |    at com.google.inject.Guice.createInjector(Guice.java:69)
jenkins_master |    at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master |    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master |    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master |    at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master |    at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master |    at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master |    at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master |    at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master |    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master |    at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master |    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master |    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master |    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master |    at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:34.594+0000 [id=30]   WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master |    at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master |    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master |    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master |    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master |    at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master |    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master |    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master |    at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master |    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master |    at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master |    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master |    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master |    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master |    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master |    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master |    at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:34.625+0000 [id=30]   INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
jenkin
alexku7 commented 1 year ago

We have the same issue :(

bewczardski commented 1 year ago

Mileage may vary depending on the plugin dependency tree on the controller, but if possible, downgrade OAuth Credentials to 0.645.ve666a_c332668, and Google OAuth Credentials to 1.0.11.

I have a 2.414.3 controller running without any errors at startup using those versions. All other plugins are up to date.

RaiaN commented 1 year ago

Just for the reference, using Docker and jenkins/jenkins:lts leads to the same issue. Downgrading to OAuth Credentials to 0.645.ve666a_c332668, and Google OAuth Credentials to 1.0.11 do not resolve the issue :(

basil commented 12 months ago

Fixed in #205