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

Dimension plugin breaks job config UI with JellyTagException (NoClassDefFoundError for DimensionsRuntimeException)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • dimensionsscm-plugin
    • None
    • Jenkins 2.249.3) | dimensionsscm:0.8.16
      Jenkins 2.289.2 | dimensionsscm:0.9.1
    • dimensionsscm-0.9.2

      Issue

      The plugin breaks the UI thus any type of configuration is not available

      Jenkins logs shows

      2021-07-09 08:45:54.392+0000 [id=84]	WARNING	h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 4e2261b1-0185-4f97-9195-bc86e5468047
      org.apache.commons.jelly.JellyTagException: jar:file:/home/carlosrodlop/.jenkins/war/WEB-INF/lib/jenkins-core-2.289.2.jar!/lib/form/radioBlock.jelly:77:23: <d:invokeBody> com/serena/dmclient/api/DimensionsRuntimeException
      	at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
      
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.lang.NoClassDefFoundError: com/serena/dmclient/api/DimensionsRuntimeException
      	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
      
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	... 216 more
      Caused by: java.lang.ClassNotFoundException: com.serena.dmclient.api.DimensionsRuntimeException
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
      
      	... 253 more
      Caused: javax.servlet.ServletException
      	at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:249)
      
      	...
      

      Tested with:

      • Jenkins 2.249.3 | dimensionsscm:0.8.16
      • Jenkins 2.289.2 | dimensionsscm:0.9.1

      According to my first test is prior to 2.264 so it does not seems the same issue as https://www.jenkins.io/doc/developer/views/table-to-div-migration/ . Although the symptoms are the same.

      Workaround

      The plugin requires some proprietary Dimensions CM .jar files. Follow the instructions to install them in the docs.

      Solution

      Missing JAR files should not break the job configuration page, and there should be an alert in Manage Jenkins to tell admins that the JARs are missing and their installation is currently incomplete.

       

          [JENKINS-66107] Dimension plugin breaks job config UI with JellyTagException (NoClassDefFoundError for DimensionsRuntimeException)

          This is almost certainly because the proprietary Dimensions CM Java API JAR files have not been added to the plugin.

          I did try to make this exception report in a nice way with instructions on how to fix it a while ago. However, it looks like the code path that fails has changed since then, so you now get this less helpful exception instead. Something to look at for the future.

          See https://github.com/jenkinsci/dimensionsscm-plugin/blob/master/docs/user-guide.md#installation for details on how to add these JAR files to the plugin.

          David Conneely added a comment - This is almost certainly because the proprietary Dimensions CM Java API JAR files have not been added to the plugin. I did try to make this exception report in a nice way with instructions on how to fix it a while ago. However, it looks like the code path that fails has changed since then, so you now get this less helpful exception instead. Something to look at for the future. See https://github.com/jenkinsci/dimensionsscm-plugin/blob/master/docs/user-guide.md#installation  for details on how to add these JAR files to the plugin.

          Thanks for the clarification dconneely

          I see this behavior like a OPEN Bug (NOT RESOLVED) for the following reasons:

          1) The fact that the plugin installation is not completed does not justify to BREAK the Jenkins UI. It should be correctly managed by the plugin.
          2) There is not a warning message listed in the Manage Jenkins Dashboard to warn the users when the installation of this plugin is not completed and what are the consecuences.

          Personally, I would blacklist this plugin from the Jenkins Update center until the above points are corrected.

          Carlos Rodríguez López added a comment - Thanks for the clarification dconneely I see this behavior like a OPEN Bug (NOT RESOLVED) for the following reasons: 1) The fact that the plugin installation is not completed does not justify to BREAK the Jenkins UI. It should be correctly managed by the plugin. 2) There is not a warning message listed in the Manage Jenkins Dashboard to warn the users when the installation of this plugin is not completed and what are the consecuences. Personally, I would blacklist this plugin from the Jenkins Update center until the above points are corrected.

          Carlos: Thank you for the great suggestions!! I'll take a look into implementing ideas 1 and 2 in the next few days. I need to dig into why the old fix for item 1 is no longer working - my guess is new version of stapler or jelly has broken it.

          David Conneely added a comment - Carlos: Thank you for the great suggestions!! I'll take a look into implementing ideas 1 and 2 in the next few days. I need to dig into why the old fix for item 1 is no longer working - my guess is new version of stapler or jelly has broken it.

          > I need to dig into why the old fix for item 1 is no longer working

          It might be related to https://www.jenkins.io/doc/developer/views/table-to-div-migration/ .

          Carlos Rodríguez López added a comment - > I need to dig into why the old fix for item 1 is no longer working It might be related to https://www.jenkins.io/doc/developer/views/table-to-div-migration/ .

          Pushed fixes for item 1 and item 2.

          David Conneely added a comment - Pushed fixes for item 1 and item 2 .

          (forgot to Close the issue when I released 0.9.2 with fixes in it)

          David Conneely added a comment - (forgot to Close the issue when I released 0.9.2 with fixes in it)

            Unassigned Unassigned
            carlosrodlop Carlos Rodríguez López
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: