Unable to launch TestNG Test - Shows a pop-up dialog - java

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)

Related

Gradle build failing to parse and build while running the app

I was just launching my app on an avd and this weird "Failed to parse" error is occurring again and again. This is what is popping up:
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ParseLibraryResourcesTask$ParseResourcesRunnable
I tried to build the entire project again, but it gives the same output again and again. Can somebody help? Cheers :)

NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream when debugging tests

I'm new to IntelliJ IDEA and can't understand the cause for the following error when trying to debug unit tests:
Error:gradle-resources-test:StorageService_test: java.lang.NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream when debugging tests in IntelliI IDEA
although the code is building fine I can't debug because the debugger give me this error and fail to start.

Unable to debug in Eclipse (Arm toolchain): Internal error occurred during "launching name"

I am having a problem debugging in linux eclipse. When I run the debugger, I get the following error:
An internal error occurred during: "Launching (program name)".
org.eclipse.cdt.dsf.gdb.service.GdbDebugServicesFactory.(Ljava/lang/String;)V
For more info, I am trying to debug a simple hello world tutorial using GDB QEMU. After I close out the error it appears to have started a debug session, which I am then unable to terminate.
Anyone have an idea what the problem could be?

Error with pkg: /data/local/tmp/... Failure [INSTALL_FAILED_DEXOPT]

I want to run my project in a virtual device but I got the error below. Before it occurred this time, I was never facing this error.
What's does this error exactly mean and what is the root cause for it? Is there any suggestion to how fix it?
error with pkg: /data/local/tmp/"my package name"
Failure [INSTALL_FAILED_DEXOPT]

Script error: "An error has occured in the script on the page"

I get a error on my JSP page:
Script error: "An error has occured in the script on the page"
When I try to run the Eclipse in the debug perspective and I am closing down the browser window of the eclipse where my application is running.
Because of the error the application hangs, and I am unable to test my application.
Is there any solution to this? I have to restart my eclipse again and again.
This would lead to corrupted files.
If you're lucky, the error message is caused by an Exception. In that case, you can add a Java Exception Breakpoint and the application should pause at the point where the script error is detected.

Categories