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

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.

Related

CI pipeline erroring out on unit test cases

UtilityUnitTests > testReadFromJson() FAILED org.opentest4j.AssertionFailedError at UtilityUnitTests.java:66 UtilityUnitTests > testWriteToJson() FAILED org.opentest4j.AssertionFailedError at UtilityUnitTests.java:59
The above errors are showing on my GitLab CI pipeline run.
The automatic build works, and 9 other test cases work.
Does anyone have an idea on these errors?

java.lang.StackOverflowError when running cucumber java from Katalon Studio

when ever we run:
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
CucumberKW.runFeatureFileWithTags(featureFileFolder, (([finalTag]) as String[]))
we are using cucumber jar wrapped inside katalon Studio testing framework.
running from jenkins as part of docker image, sometimes it's causing
Keyword runFeatureFileWithTags was failed (Root cause: java.lang.StackOverflowError
at cucumber.runtime.io.FileResourceIterator$FileIterator.next(FileResourceIterator.java:73)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:29)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:27)
at cucumber.runtime.io.FlatteningIterator.moveToNext(FlatteningIterator.java:32)
and the tests are not being executed because of this.
Not sure what is the root cause for this. Any insight or help is much appreciated

IntelliJ 2019.2.2: Unable to debug gradle unit tests

Every time I try to debug one of my tests (junit 5), I get an exception:
2019-12-20 10:40:53,776 [4972237] WARN - .ExternalSystemTaskDebugRunner - Interrupted function call: accept failed
java.net.SocketException: Interrupted function call: accept failed
at java.base/java.net.PlainSocketImpl.accept0(Native Method)
at java.base/java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:159)
at java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:458)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:551)
at java.base/java.net.ServerSocket.accept(ServerSocket.java:519)
at com.intellij.openapi.externalSystem.service.execution.ForkedDebuggerThread.run(ForkedDebuggerThread.java:103)
I've done quite a bit of searching through SO here, and have found several people that had similar problems. Most of them were resolve simply by upgrading (to 2013 or whatever, these questions aren't exactly spring chickens). The rest required some special sauce relevant to their system (android stuff mostly). Or they're getting a different exception (being disconnected, where I'm never getting the connection in the first place).
These tests (unit tests for the most part) are attached to a module with no "main".
I've tried launching gradlew -DtestDebug.test=true cleanTest test, and then connect with a remote debug session. I get an error: Unable to open debugger port (localhost:5005); java.net.ConnectException "Connection refused: connect", which I believe is just what IntelliJ's gui shows when it receives the aforementioned exception.
Ideally, I'd like to set my breakpoints, debug-launch my test task (perhaps specifying a class or individual #Test), and it'd Just Work.
Does anyone have any other ideas I could try? Logs I could look at?
The workaround is to switch the build/run actions to IntelliJ IDEA instead of using Gradle.
But if you still have this issue in the current IDE version, please consider reporting it with the sample project and the logs (Help | Compress Logs and Show in ...) attached.

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

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)

mule funciton test cases giving error with maven

When I run my testcase using righclick on project Run as Junit test Its running fine.
But when I try to run with maven(maven clean install)
I am getting timeout exception.
[![INFO 2016-02-01 16:48:28,900 \[Thread-5\] org.mule.module.xml.filters.SchemaValidationFilter: Schema factory implementation: com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory#3074311d][1]][1]
I am getting continuous above log.

Categories