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

Cannot configure SonarQube plugin with JCasC

XMLWordPrintable

    • sonar-2.11

      The most recent version of JCasC that works with SonarQube is 1.23. Anything after that results in

      SEVERE: Failed ConfigurationAsCode.init
      java.lang.Error: java.lang.reflect.InvocationTargetException
      	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:1095)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	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)
      Caused by: 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)
      	... 8 more
      Caused by: io.jenkins.plugins.casc.ConfiguratorException: unclassified: error configuring 'unclassified' with class io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator configurator
      	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:652)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:684)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:668)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:567)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:280)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:272)
      	... 13 more
      Caused by: io.jenkins.plugins.casc.ConfiguratorException: triggers is required to configure class hudson.plugins.sonar.SonarInstallation
      	at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:134)
      	at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:77)
      	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:268)
      	at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.check(DataBoundConfigurator.java:101)
      	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:345)
      	at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:288)
      	at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:353)
      	at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:288)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$6(ConfigurationAsCode.java:684)
      	at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:646)
      	... 18 more

      I'm doing this:

      sonarglobalconfiguration:
        buildWrapperEnabled: true
        installations:
          - name: "SonarQube 1"
            serverUrl: "http://example.com/sonar1"
            serverAuthenticationToken: "asdasd"
          - name: "SonarQube 2"
            serverUrl: "https://example.com/sonar2"
            serverAuthenticationToken: "fvcxvffsadfasdd"

            smasher Daniel Estermann
            svenstaro Sven-Hendrik Haase
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: