Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/t

Posted 软件测试杂谈

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/t相关的知识,希望对你有一定的参考价值。

TestNG运行时报以下错误:

Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/testng/CommandLineArgs;)V
    at org.testng.remote.AbstractRemoteTestNG.configure(AbstractRemoteTestNG.java:77)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:214)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

 

Exception in thread "main" java.lang.NoClassDefFoundError: org/testng/CommandLineArgs
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:41)
Caused by: java.lang.ClassNotFoundException: org.testng.CommandLineArgs
    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)
    ... 1 more

 

以上是关于Exception in thread "main" java.lang.NoSuchMethodError: org.testng.TestNG.configure(Lorg/t的主要内容,如果未能解决你的问题,请参考以下文章

Exception in thread "main" java.lang.UnsupportedClassVersionError

Exception in thread "main" java.util.InputMismatchException

Exception in thread "main" java.lang.ClassCastException

Exception in thread "main" java.lang.UnsatisfiedLinkError:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

Exception in thread "main" java.lang.NullPointerException