1

I'm trying to launch some TestNG tests in Eclipse, which were working earlier. But now it doesn't run at all, and shows a dialog saying
"Launching myclassname has encountered a problem."
It doesn't happen to all the tests in the package, but only to some of them.
What could be the reason? Any help to narrow down the problem would be really appreciated.

An internal error occurred during: "Launching myclassname". java.lang.ClassCastException: org.eclipse.jdt.core.dom.MarkerAnnotation cannot be cast to org.eclipse.jdt.core.dom.SingleMemberAnnotation at org.testng.eclipse.util.param.TestNGMethodParameterVisitor.getParametersMap(TestNGMethodParameterVisitor.java:182) at org.testng.eclipse.util.param.ParameterSolver.parseParameterNames(ParameterSolver.java:130) at org.testng.eclipse.util.param.ParameterSolver.solveParameters(ParameterSolver.java:113) at org.testng.eclipse.util.param.ParameterSolver.getParameterNames(ParameterSolver.java:91) at org.testng.eclipse.util.param.ParameterSolver.solveParameters(ParameterSolver.java:60) at org.testng.eclipse.ui.util.ConfigurationHelper.getLaunchSuites(ConfigurationHelper.java:416) at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.createVMRunner(TestNGLaunchConfigurationDelegate.java:296) at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launchTypes(TestNGLaunchConfigurationDelegate.java:161) at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:91) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

  • do you see any relate error in "Error Log" view, by navigating "Windows -> Show View -> Others -> Error Log" . I need more stack trace do diagnose this issue. BTW, what's Eclipse Version you used? – XuQing Tan Oct 25 '16 at 08:26
  • Can you provide the code portion? It seems that you you did some mistakes in any of your annotations. – optimistic_creeper Oct 25 '16 at 08:43
  • Sorry for posting multiple comments. The error log was quite long for a comment. I'm using Eclipse Luna. Also, I could run the tests through my TestNG xml, so I'm assuming that the error is not related to the code. – kanayikkaran Oct 25 '16 at 10:05
  • 1
    @kanayikkaran You can update your question instead or continue here: https://github.com/cbeust/testng-eclipse/issues/294 – juherr Oct 25 '16 at 22:05
  • The issue was related to TestNG Eclipse plug-in and is fixed now. Available in beta update site. Thanks a lot @JulienHerr for directing to the right forum. – kanayikkaran Oct 26 '16 at 09:47

0 Answers0