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

nunit plugin fails in hudson-1.296

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: nunit-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Nunit plugin failes under startup because of classpath dependency to the native
      maven support - which has been refactored and pulled out as a plugin in 1.296.

      --------------------------------
      SEVERE: Failed to load a plug-in nunit
      hudson.util.IOException2: Failed to initialize
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:223)
      at hudson.PluginManager.<init>(PluginManager.java:154)
      at hudson.model.Hudson.<init>(Hudson.java:513)
      at hudson.WebAppMain$2.run(WebAppMain.java:191)
      Caused by: java.lang.NoClassDefFoundError: hudson/maven/agent/AbortException
      at hudson.plugins.nunit.PluginImpl.start(PluginImpl.java:32)
      at
      hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:231)
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:220)
      ... 3 more
      Caused by: java.lang.ClassNotFoundException: hudson.maven.agent.AbortException
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      ... 6 more

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            Capturing the regression in the core as issue #3436. I'm keeping this bug open
            to indicate that the error message be restored, but that's up to redsolo to decide.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - Capturing the regression in the core as issue #3436. I'm keeping this bug open to indicate that the error message be restored, but that's up to redsolo to decide.
            Hide
            pnyheim Paul Nyheim added a comment -

            What exactly are you suggesting?

            1. Should the fix be reverted back to using hudson.maven.agent.AbortException

            or

            2. Should the fix use hudson.AbortException, and log errors to the listener?

            On a side note, I have noticed the following:

            • cppunit plugin contains the same usage of hudson.maven.agent.AbortException
            • the checkstyle and the tasks plugin uses a different approach - and defines
              its own hudson.plugins.[checkstyle|tasks].util.AbortException which it catches
              just before leaving the perform method, logs the message from the exception,
              sets build result to failure and returns false.

            IMO, the approach of checkstyle and tasks plugin seems the best one, but
            approach 1 is of course the simplest if the visibility issue is fixed.
            Regards,
            Paul Nyheim

            Show
            pnyheim Paul Nyheim added a comment - What exactly are you suggesting? 1. Should the fix be reverted back to using hudson.maven.agent.AbortException or 2. Should the fix use hudson.AbortException, and log errors to the listener? On a side note, I have noticed the following: cppunit plugin contains the same usage of hudson.maven.agent.AbortException the checkstyle and the tasks plugin uses a different approach - and defines its own hudson.plugins. [checkstyle|tasks] .util.AbortException which it catches just before leaving the perform method, logs the message from the exception, sets build result to failure and returns false. IMO, the approach of checkstyle and tasks plugin seems the best one, but approach 1 is of course the simplest if the visibility issue is fixed. Regards, Paul Nyheim
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I'll improve the AbortException in the core to take the string argument, and
            have the catcher report that into the log.

            Once that's in place, I recommend the the nunit and cppunit plugin to just
            replace hudson.maven.agent.AbortException by hudson.AbortException. The
            checkstyle and tasks plugin should be able to do the same, too, and there won't
            be a need for anyone to define their own AbortException classes.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I'll improve the AbortException in the core to take the string argument, and have the catcher report that into the log. Once that's in place, I recommend the the nunit and cppunit plugin to just replace hudson.maven.agent.AbortException by hudson.AbortException. The checkstyle and tasks plugin should be able to do the same, too, and there won't be a need for anyone to define their own AbortException classes.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/core/src/main/java/hudson/AbortException.java
            trunk/hudson/main/core/src/main/java/hudson/tasks/junit/JUnitResultArchiver.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenUtil.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=16904
            Log:
            improved AbortException so that it can record the error message. Necessary for plugins like nunit and cppunit as discussed in JENKINS-3427.
            This should be in 1.298.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/AbortException.java trunk/hudson/main/core/src/main/java/hudson/tasks/junit/JUnitResultArchiver.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenUtil.java http://fisheye4.cenqua.com/changelog/hudson/?cs=16904 Log: improved AbortException so that it can record the error message. Necessary for plugins like nunit and cppunit as discussed in JENKINS-3427 . This should be in 1.298.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : redsolo
            Path:
            trunk/hudson/plugins/nunit/pom.xml
            trunk/hudson/plugins/nunit/src/main/java/hudson/plugins/nunit/NUnitPublisher.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=17066
            Log:
            [FIXED JENKINS-3427] Removed dependency to maven plugin, uses the AbortException in core instead.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : redsolo Path: trunk/hudson/plugins/nunit/pom.xml trunk/hudson/plugins/nunit/src/main/java/hudson/plugins/nunit/NUnitPublisher.java http://fisheye4.cenqua.com/changelog/hudson/?cs=17066 Log: [FIXED JENKINS-3427] Removed dependency to maven plugin, uses the AbortException in core instead.

              People

              • Assignee:
                redsolo redsolo
                Reporter:
                pnyheim Paul Nyheim
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: