java.lang.NoClassDefFoundError: hudson/matrix/MatrixRun

Jenkins JIRA | Andrew Sumner | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I get the following error when trying to run a unit test. Example code is below. I was able to get past this error by including dependancy testCompile 'org.jvnet.hudson.main:hudson-core:1.159' but that then said other classes where missing. This doesn't see the correct path to go down anyway. *Error* {noformat} java.lang.NoClassDefFoundError: hudson/matrix/MatrixRun at com.inedo.TriggerBuildStepTest.<init>(TriggerBuildStepTest.java:13) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ... Caused by: java.lang.ClassNotFoundException: hudson.matrix.MatrixRun at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 23 more {noformat} *Code Example* {noformat} package test.example; import static org.junit.Assert.*; import org.jvnet.hudson.test.JenkinsRule; import org.apache.commons.io.FileUtils; import hudson.model.*; import hudson.tasks.Shell; import org.junit.Test; import org.junit.Rule; public class TriggerBuildStepTest { @Rule public JenkinsRule j = new JenkinsRule(); @Test public void first() throws Exception { FreeStyleProject project = j.createFreeStyleProject(); project.getBuildersList().add(new Shell("echo hello")); FreeStyleBuild build = project.scheduleBuild2(0).get(); System.out.println(build.getDisplayName() + " completed"); // TODO: change this to use HtmlUnit String s = FileUtils.readFileToString(build.getLogFile()); assertTrue(s.contains("+ echo hello")); } } {noformat}

    Jenkins JIRA | 2 years ago | Andrew Sumner
    java.lang.NoClassDefFoundError: hudson/matrix/MatrixRun
  2. 0

    I get the following error when trying to run a unit test. Example code is below. I was able to get past this error by including dependancy testCompile 'org.jvnet.hudson.main:hudson-core:1.159' but that then said other classes where missing. This doesn't see the correct path to go down anyway. *Error* {noformat} java.lang.NoClassDefFoundError: hudson/matrix/MatrixRun at com.inedo.TriggerBuildStepTest.<init>(TriggerBuildStepTest.java:13) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ... Caused by: java.lang.ClassNotFoundException: hudson.matrix.MatrixRun at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 23 more {noformat} *Code Example* {noformat} package test.example; import static org.junit.Assert.*; import org.jvnet.hudson.test.JenkinsRule; import org.apache.commons.io.FileUtils; import hudson.model.*; import hudson.tasks.Shell; import org.junit.Test; import org.junit.Rule; public class TriggerBuildStepTest { @Rule public JenkinsRule j = new JenkinsRule(); @Test public void first() throws Exception { FreeStyleProject project = j.createFreeStyleProject(); project.getBuildersList().add(new Shell("echo hello")); FreeStyleBuild build = project.scheduleBuild2(0).get(); System.out.println(build.getDisplayName() + " completed"); // TODO: change this to use HtmlUnit String s = FileUtils.readFileToString(build.getLogFile()); assertTrue(s.contains("+ echo hello")); } } {noformat}

    Jenkins JIRA | 2 years ago | Andrew Sumner
    java.lang.NoClassDefFoundError: hudson/matrix/MatrixRun
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider

    Stack Overflow | 3 years ago | sbala_20
    java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider". But this class is available in weblogic.jar and the same is there in tomcat/lib folder. Any suggestion on how to solve this exception? EVERE: Servlet.service() for servlet [test] in context with path [/VTM-Engg-UI] threw exception [Handler processing failed; nested exception is **java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider] with root causejava.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider** at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  5. 0

    Mailing list for developers driven mainly in Spanish language ()

    gmane.org | 2 years ago
    java.lang.NoClassDefFoundError: com/toedter/calendar/JCalendar at isf.aq3.IUsuario.Extension.ExecuteNuevaAnalitica.&lt;clinit&gt;(ExecuteNuevaAnalitica.java:14)<br> &nbsp;&nbsp;&nbsp; at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      hudson/matrix/MatrixRun

      at com.inedo.TriggerBuildStepTest.<init>()
    2. com.inedo
      TriggerBuildStepTest.<init>
      1. com.inedo.TriggerBuildStepTest.<init>(TriggerBuildStepTest.java:13)
      1 frame
    3. Java RT
      NativeConstructorAccessorImpl.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      2 frames