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)
Asked
Active
Viewed 149 times
-2

Krishnan Mahadevan
- 14,121
- 6
- 34
- 66

Seeda Ramaiah
- 15
- 4
-
You have a CLASSPATH problem. You need to ensure that you have included the proper jars. Since you havent told us how you are managing your build path, its hard to say anything. – Krishnan Mahadevan Mar 31 '18 at 08:31
-
Yes, It is CLASSPATH problem and I am able to resolve it by adding the correct jars to the CLASSPATH this problem will go away.. – Seeda Ramaiah Apr 12 '18 at 06:29
1 Answers
0
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.

Seeda Ramaiah
- 15
- 4