Hi,
I am getting the below error while running the first TestNG program.
Progam -
import org.testng.annotations.Test;
public class SearchAndBuyTest {
@Test
public void search()
{
System.out.println("testng test");
}
}
Error -
[RemoteTestNG] detected TestNG version 7.10.1
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.testng.log4testng.Logger.lambda$getLogger$0(Logger.java:30)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1710)
at org.testng.log4testng.Logger.getLogger(Logger.java:30)
at org.testng.TestNG.<clinit>(TestNG.java:111)
at org.testng.remote.support.RemoteTestNGFactory7_9.createRemoteTestNG(RemoteTestNGFactory7_9.java:16)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:67)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
it is resolved now.. please ignore