testng-team / testng-eclipse

Eclipse plug-in for TestNG
https://testng.org
194 stars 164 forks source link

Getting Error while running Java program with TestNG #476

Closed gauravpratap01 closed 4 years ago

gauravpratap01 commented 4 years ago

I am getting below error while using TestNG in java. And if i am running the same program without TestNG (i.e. using the main() class method), then it's working fine.

TestNG version that i am using is-7.0.1 Java and eclipse both are upto date.

[RemoteTestNG] detected TestNG version 7.0.1 Exception in thread "main" java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: com/google/inject/Stage at org.testng.internal.Configuration.(Configuration.java:33) at org.testng.TestNG.init(TestNG.java:216) at org.testng.TestNG.(TestNG.java:200) at org.testng.remote.AbstractRemoteTestNG.(AbstractRemoteTestNG.java:17) at org.testng.remote.support.RemoteTestNG6_12.(RemoteTestNG6_12.java:18) at org.testng.remote.support.RemoteTestNGFactory6_12.createRemoteTestNG(RemoteTestNGFactory6_12.java:16) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:67) Caused by: java.lang.NoClassDefFoundError: com/google/inject/Stage ... 7 more Caused by: java.lang.ClassNotFoundException: com.google.inject.Stage at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more

gauravpratap01 commented 4 years ago

Issue couldn't resolve, ultimately i had to use Maven which i was avoiding earlier.

missedone commented 4 years ago

duplicates with #472, the testng release 7.2.0 is on the way.