Recently I can observe very weird behavior of TestNG tests launched from surefire plugin. Once suite is finished tests execution just hang without any exceptions or informations. After killing executtion and clearing workspace it seems that SurefireBotter hanged:
Failed to clean project: Failed to delete C:\[path]\target\surefire\surefirebooter380043352616947373.jar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete C:\[path]\target\surefire\surefirebooter380043352616947373.jar
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.IOException: Failed to delete C:\[path]\target\surefire\surefirebooter380043352616947373.jar
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:191)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:117)
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:193)
The curious thing is that after killing process with maven manually after it hangs, I still can see java processes in system responsible for that booter.
Framework that I'm using is based on Spring, however I have no idea if this is meaningfull :)
Any hints will be more than welcome :)
You can kill the java process using JPS (a tool provide with the JDK). JPS will list process and id. You can kill the process by the id
Related
I have updated Sonar to version 7.9.2 and now while trying to give build through Jenkins getting below error.
BUILD FAILED
org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182)
at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:66)
at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:55)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93)
at org.sonar.runner.impl.Jars.download(Jars.java:70)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
... 25 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:87)
... 28 more
Not able to understand which libraries are not getting downloaded.
Other Details
Apache Ant version 1.7.1
SonarQube Ant Task version: 2.4
sonarqube-7.9.2
Also want to update that the default java version is 1.7.80 which is used to compile the source code whereas for running sonarqube java 11 is being used.
Please suggest.
Let me know in case any additional details are required.
I'm getting this exception on my jenkins windows slave node. Any ideas please as to what may be causing it? I cant find any info about this exception anywhere.
java.lang.UnsupportedOperationException: Cannot nest operations in the same thread. Each nested operation must run in its own thread.
at org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry.doStartOperation(DefaultBuildOperationWorkerRegistry.java:65)
at org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry.access$400(DefaultBuildOperationWorkerRegistry.java:30)
at org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry$DefaultOperation.operationStart(DefaultBuildOperationWorkerRegistry.java:163)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:68)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:47)
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.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.internal.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.internal.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.internal.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some child operations have not yet completed.
Reading this post, I upgraded from Gradle v3.2.1 to v3.4 and the problem has gone away.
I was trying to build Neo4j from https://github.com/neo4j/community.git
I'm building with Maven 3.05 and java 1.7.0_17
Running command:
mvn clean install -Dlicense.skip=true -DminimalBuild
[ERROR] Failed to execute goal org.neo4j.build.plugins:licensing-maven-plugin:1.7.5:check (list-all-licenses) on project neo4j-kernel: Generated file differs from the existing file.
[ERROR] Generated: E:\neo4j\clone\gitBuild\community\kernel\target\neo4j-kernel-1.9-SNAPSHOT-NOTICE.txt
[ERROR] Existing: E:\neo4j\clone\gitBuild\community\kernel\target\..\NOTICE.txt
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.neo4j.build.plugins:licensing-maven-plugin:1.7.5:check (list-all-licenses) on project neo4j-kernel: Generated file differs from the existing file.
Generated: E:\neo4j\clone\gitBuild\community\kernel\target\neo4j-kernel-1.9-SNAPSHOT-NOTICE.txt
Existing: E:\neo4j\clone\gitBuild\community\kernel\target\..\NOTICE.txt
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Generated file differs from the existing file.
Generated: E:\neo4j\clone\gitBuild\community\kernel\target\neo4j-kernel-1.9-SNAPSHOT-NOTICE.txt
Existing: E:\neo4j\clone\gitBuild\community\kernel\target\..\NOTICE.txt
at org.linuxstuff.mojo.licensing.CheckMojo.generatedAndExistingDiffer(CheckMojo.java:198)
at org.linuxstuff.mojo.licensing.CheckMojo.compareToExistingFile(CheckMojo.java:163)
at org.linuxstuff.mojo.licensing.CheckMojo.execute(CheckMojo.java:138)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
I am building with PowerShell and the vanilla Github client for W8. Once you can run maven (adjusting the system paths etc), you should do
mvn install "-Dlicensing.skip"
Since the line endings windows adds are skrewing up the checks.
Does that work?
Please do:
cd community/licensecheck-config
mvn clean install there
and then build the rest of the project?
using Eclipse to try and build a maven project with Eclipse. Anyway when I try to run mvn clean install I get the following error
Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1
Its calling a MojoExecutionException.
Anyway I am getting the code from a subversion repository which works for others so its not the pom file. I done some googling and it mentions it could be the JBoss version I have running which could be causing the issue. I am using JBoss6.1.0. Also using Maven 3.0.4
Anyone have any ideas? If you need more info just let me know. Thanks.
EDIT: Full stack trace
[ERROR] Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error while running wsconsume
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.Exception: Process terminated with code 1
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumerOutOfProcess(WSContractDelegate.java:133)
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumer(WSContractDelegate.java:99)
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:149)
... 21 more
Well figured it out anyway. Turns out it was a windows limitation with file names. The file path was too long. As such once I moved it to a folder just below root, eg. C:/folder_here then it worked. Also switched to JDK 1.7 because another problem with windows means that if you use 1.6 you need to download another couple of jars. Anyway hope this helps someone else out.
Could anyone assist me with this Jigomerge error in Jenkins?
I'm sure its probably a config issue but I don't know what config to change.
Google searches showed Jira tickets that were closed with no comments on what fixed the issue.
class java.lang.RuntimeException # Failed to reset workspace !
java.lang.RuntimeException: Failed to reset workspace !
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at SvnMergeTool.resetWorkspace(script1000004.groovy:283)
at SvnMergeTool.launchSvnMerge(script1000004.groovy:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704)
at SvnMergeTool.invokeMethod(script1000004.groovy)
at hudson.plugins.jigomerge.JigomergeBuilder.perform(JigomergeBuilder.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.build(MavenModuleSetBuild.java:864)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:620)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462)
at hudson.model.Run.run(Run.java:1404)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Build step 'Perform svn merge with Jigomerge' changed build result to FAILURE
After finding the verbose indicator I looked at the output and noticed that the workspace that Jenkins and jigomerge were trying to update was missing part of the name. This was due to a space in the name of the folder: My CI build.
The name with spaces was seen as /root/.jenkins/My instead of /root/.jenkins/My\ CI\ build.
For this reason, the error that the file or directory did not exist was being returned, failing the merge.