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

Active Directory Plugin java.lang.ClassNotFoundException: hudson.util.spring.BeanBuilder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • jenkins 2.277.3,
      active-directory 2.23,
      configuration-as-code 1.46

      Jenkins core removed the hudson.util.spring.* package with https://github.com/jenkinsci/jenkins/pull/4848. While the active-directory plugin doesn't use BeanBuilder directly it is used by the parent class of a child (ActiveDirectorySecurityRealm) that extends AbstractPasswordBasedSecurityRealm. Perhaps the active-directory plugin needs to be compiled against a newer version of Jenkins core?

      2021-04-27 16:00:55.460+0000 [id=29]  WARNING jenkins.model.Jenkins$5#runTask: ConfigurationAsCode.init failed perhaps due to plugin dependency issues
      java.lang.ClassNotFoundException: hudson.util.spring.BeanBuilder
            at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387)
            at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342)
            at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
      Caused: java.lang.NoClassDefFoundError: hudson/util/spring/BeanBuilder
            at hudson.plugins.active_directory.ActiveDirectorySecurityRealm.createSecurityComponents(ActiveDirectorySecurityRealm.java:336)
            at hudson.security.SecurityRealm.getSecurityComponents(SecurityRealm.java:550)
            at hudson.security.HudsonFilter.reset(HudsonFilter.java:135)
            at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2629)
      Caused: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at io.jenkins.plugins.casc.Attribute._setValue(Attribute.java:512)
            at io.jenkins.plugins.casc.Attribute.setValue(Attribute.java:232)
            at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:357)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: securityRealm: Failed to set attribute securityRealm(class: class hudson.security.SecurityRealm, multiple: false)
            at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:359)
            at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:270)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: Failed to save hudson.model.Hudson@5d79ebc9
            at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:273)
            at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$configureWith$6(ConfigurationAsCode.java:747)
            at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:691)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: jenkins: error configuring 'jenkins' with class io.jenkins.plugins.casc.core.JenkinsConfigurator configurator
            at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:697)
            at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:747)
            at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616)
            at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
            at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
      Caused: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      Caused: java.lang.Error
            at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
            at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
            at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
            at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
            at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
            at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
            at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
      

      JCasC:

        securityRealm:
          activeDirectory:
            bindPassword: ${LDAP_PASSWORD}
            customDomain: true
            domains:
              - bindName: ${LDAP_USERNAME}@website.com
                bindPassword: ${LDAP_PASSWORD}
                name: "website.com"
                servers: "my.website.com:3268"
                tlsConfiguration: JDK_TRUSTSTORE
            groupLookupStrategy: RECURSIVE
            removeIrrelevantGroups: true
            startTls: true
      

            fbelzunc FĂ©lix Belzunce Arcos
            mrichar2 Mark R
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: