FAILED CONFIGURATION: @BeforeClass baseBeforeClass(org.testng.TestRunner@74fe5c40)
java.lang.NoSuchMethodError: com.hp.lft.report.ReportingProvider.getInstance()Lcom/hp/lft/report/ReportingProvider;
at com.hp.lft.unittesting.UnitTestBase.initReporter(UnitTestBase.java:314)
at com.hp.lft.unittesting.TestNgUnitTestBase.classSetup(TestNgUnitTestBase.java:38)
at unittesting.UnitTestClassBase.baseBeforeClass(UnitTestClassBase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
<... internal TestNG methods ...>
at org.testng.TestNG.main(TestNG.java:1411)
FAILED CONFIGURATION: @AfterClass baseAfterClass(org.testng.TestRunner@74fe5c40)
java.lang.NoSuchMethodError: com.hp.lft.report.ReportingProvider.getInstance()Lcom/hp/lft/report/ReportingProvider;
at com.hp.lft.unittesting.UnitTestBase.closeReportLevels(UnitTestBase.java:176)
at com.hp.lft.unittesting.TestNgUnitTestBase.classTearDown(TestNgUnitTestBase.java:77)
at unittesting.UnitTestClassBase.baseAfterClass(UnitTestClassBase.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:212)
<... internal TestNG methods ...>
at org.testng.TestNG.main(TestNG.java:1411)
The problem solved by placing the Correct jars to CLASSPATH and the main problem is the jars i was using are old jar as they dont have TestNG annotation method inside.
Solution : if this arises please check your jars are having these methods or not if not use the jar having those methods.