An unexpected error occurred while launching the test runtime (return code 1) - maven

I have a Java project and there exists a Testing job in Jenkins, and it worked fine with all the required testcases. From recent times it shows a sporadic failure as mentioned below:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:1.6.0:test (default-test) on project MyProjectName: An unexpected error occurred while launching the test runtime (return code 1).
We could see there is no recent changes done related to the plugin, and not pretty sure like why this issue happens. can someone provide inputs to resolve the same ? Thank you !

Related

Jenkins maven projet build failed on fork during test

I'm building maven project on Jenkins (version 2.263.4, not the last but not so far).
It's a git project with pipeline configuration and webhook from bitbucket when push is done on the project.
So when a developper create a branch and another one a pull request, i have 2 build in parallel. Domain test running in about 45min.
And sometimes(not always), i have this error :
Command was /bin/sh -c cd /jenkins/workspace/a-hub_test-plantage-jenkins_PR-1/server/project-core/project-core-domain && /jenkins/tools/hudson.model.JDK/jdk11/jdk-11.0.2+9/bin/java -Xmx1500M -jar /jenkins/workspace/a-hub_test-plantage-jenkins_PR-1/server/project-core/project-core-domain/target/surefire/surefirebooter15630998754365374145.jar /jenkins/workspace/a-hub_test-plantage-jenkins_PR-1/server/project-core/project-core-domain/target/surefire 2021-05-04T12-39-54_622-jvmRun1 surefire5846464826560071036tmp surefire_13691263758446667285tmp
Error occurred in starting fork, check output in log
14:46:13 [ERROR] Process Exit Code: 1
14:46:13 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
14:46:13 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
14:46:13 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
If i re run the buildin error, it work.
I'm using maven-surefire 2.22.2.
I try to configure it following many thread on stackoverfow, but nothgin work. I try with forkMode none or something else, it work but i loose coverage because jaccoco need fork to work. So i'm stuck.
What can i do to help me to debug this problem?
I don't understand why build failed when another one is building because for me Jenkins work on different working folder, no? so why the problem appear when i'have multiple build in parallel?
thanks for help
I find an hs_err_pid.log in jenkins near source code and i see out of memory! i see that my test was launch with -Xmx1500Mo and problem occured when i launched multiple branch/pr, so jenkins use all of the memory and failed all build during fork...i decrease -Xmx and all seems to work.

xl-deploy: Getting HTTP error code : 500 error

I am getting this error while running "mvn clean xldeploy:import"
Failed to execute goal com.xebialabs.xldeploy:xldeploy-maven-plugin:5.1.0:import (default-cli) on project gsp.tms.app: Execution default-cli of goal com.xebialabs.xldeploy:xldeploy-maven-plugin:5.1.0:import failed: Failed : HTTP error code : 500 -> [Help 1]
How to fix it?
May be checking log file located at XLDeploy server under "XLD_INSTALL_HOME/log/deployit.log" at time of executing this gives more details,
This error can happen for multiple reasons for example due to unknown type definition needed by package being imported which could happen because of missing plugin in XLDeploy it self.
Another thing you can do is to try to import this package from XLDeploy UI and see if there are any errors during import.

Can't generate the APK

The App works perfectly in debug variant but when I change it to release variant the build fails and it gives me this error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details, and also on my java classes (setContentView(R.layout.activity_main)) the R tells me it can't resolve symbol 'R'.
This only happens when I change the build variant to release to finish the app.
Thank you in advance!

sonar-maven-plugin getting "out of range of int" error

We're getting an odd error on one of our new github projects when we attempt to run a sonar analysis. We get the following error message and it appears to be because org.kohsuke.github.GHCommitStatus["id"] gets a "Numeric value (4275691320) out of range of int" error.
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project audit-config: Unable to load component class org.sonar.batch.scan.ImmutableProjectReactor
Interestingly enough, this is the only one of our projects having this issue. Any thoughts would be greatly appreciated!
This is a known issue: https://jira.sonarsource.com/browse/SONARGITUB-35 with unfortunately no workaround.

Jasmine maven plugin parsing test result Atlassian Bamboo

So I've managed to get jasmine maven plugin to work with maven and our js unit test.
All is running well, but i found when there's a test that failed, bamboo will say it failed, but the error is "No failed tests found, possible compilation error ocurred".
I've tried to get it to parse TEST-jasmine.xml result by specifically specify the folder JUnit parser needed, and get jasmine to write to that folder using jasmineTargetDir tag in pom.xml, but it's still not finding the right result. Jasmine faithfully write the test result to the folder, but seemingly JUnit is not parsing it?
Any clue as to why and how to solve the issue?
Running on Bamboo v 5.14.3.1 I've configured the Maven task of Default Stage to search for test result files:
And then produced fake failing test. After that the build failed with failing test:
Hope this helps

Resources