java.lang.NoClassDefFoundError: org/testng/TestNG

Apache's JIRA Issue Tracker | Mikhail Mazurskiy | 4 years ago
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    This happens sometimes (rarely). 2.14, 14.1 are affected and earlier versions too I think. The setting is: - parallel build, - surefire and failsafe are forked always. Is there anything more I can provide to help debug this? {noformat} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project PROJECT: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test failed: There was an error in the forked process [ERROR] java.lang.NoClassDefFoundError: org/testng/TestNG [ERROR] at [ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti( [ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute( [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke( [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke( [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke( [ERROR] at java.lang.reflect.Method.invoke( [ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2( [ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke( [ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider( [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess( [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main( [ERROR] Caused by: java.lang.ClassNotFoundException: org.testng.TestNG [ERROR] at$ [ERROR] at$ [ERROR] at Method) [ERROR] at [ERROR] at java.lang.ClassLoader.loadClass( [ERROR] at java.lang.ClassLoader.loadClass( [ERROR] at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass( [ERROR] ... 13 more {noformat}

    Apache's JIRA Issue Tracker | 4 years ago | Mikhail Mazurskiy
    java.lang.NoClassDefFoundError: org/testng/TestNG
  2. 0

    Cucumber-junit 1.1.3 cannot find class Examples

    GitHub | 4 years ago | danielkwinsor
    java.lang.RuntimeException: java.lang.ClassNotFoundException: Examples:
  3. 0

    Maven Surefire plugin throwing class not found exception for EclipseStarter

    Stack Overflow | 2 years ago
    java.lang.NoClassDefFoundError: org/eclipse/core/runtime/adaptor/EclipseStarter
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    scalatest 1.0 not work for scala 2.8.0.Beta1

    Google Groups | 7 years ago | Ford Guo
    java.lang.NoClassDefFoundError: scala/List
  6. 0

    Maven - Users - mvn install: Failure executing javac, but could not parse error | 1 year ago
    java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener

  1. iferca 3 times, last 2 weeks ago
  2. andyglick 1 times, last 2 weeks ago
  3. Andreas Häber 2 times, last 2 weeks ago
  4. carloscharx 6 times, last 3 weeks ago
  5. poroszd 1 times, last 3 weeks ago
68 more registered users
27 unregistered visitors
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.ClassNotFoundException


  2. Java RT
    3. Method)
    5. java.lang.ClassLoader.loadClass(
    6. java.lang.ClassLoader.loadClass(
    6 frames
  3. SureFire
    1. org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(
    1 frame
  4. org.apache.maven
    2. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(
    3. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(
    4. org.apache.maven.surefire.testng.TestNGProvider.invoke(
    4 frames
  5. Java RT
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(
    4. java.lang.reflect.Method.invoke(
    4 frames
  6. SureFire
    1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(
    2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(
    3. org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(
    4. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
    5. org.apache.maven.surefire.booter.ForkedBooter.main(
    5 frames