2
votes

I am getting an error as it is not able to initialize the ANT location although it's a Maven project.

For Jenkins job.

The output can be found below:

[htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level C:\Jenkins\workspace\Capybaras-STAGE-Regression-OnDemand\target\dashboard-reports to /home/scmbuildmaster/.jenkins/jobs/Capybaras-STAGE-Regression-OnDemand/htmlreports/Dashboard_Full_Report_with_Screenshot FATAL: HTML Publisher failure java.io.IOException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.tools.ant.Location at hudson.FilePath.copyRecursiveTo(FilePath.java:2213) at hudson.FilePath.copyRecursiveTo(FilePath.java:2101) at hudson.FilePath.copyRecursiveTo(FilePath.java:2084) at htmlpublisher.HtmlPublisher.perform(HtmlPublisher.java:213) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.tools.ant.Location at hudson.remoting.Channel$3.adapt(Channel.java:784) at hudson.remoting.Channel$3.adapt(Channel.java:779) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.FilePath.copyRecursiveTo(FilePath.java:2211) ... 12 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.tools.ant.Location at org.apache.tools.ant.ProjectComponent.(ProjectComponent.java:43) at org.apache.tools.ant.types.DataType.(DataType.java:40) at org.apache.tools.ant.types.AbstractFileSet.(AbstractFileSet.java:82) at org.apache.tools.ant.types.FileSet.(FileSet.java:36) at hudson.Util.createFileSet(Util.java:1077) at hudson.util.DirScanner$Glob.scan(DirScanner.java:124) at hudson.FilePath.writeToTar(FilePath.java:2249) at hudson.FilePath.access$2100(FilePath.java:191) at hudson.FilePath$45.invoke(FilePath.java:2190) at hudson.FilePath$45.invoke(FilePath.java:2186) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2665) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:324) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Unknown Source) at ......remote call to QA-Automation-Node(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel$3.adapt(Channel.java:782) ... 15 more Build step 'Publish HTML reports' changed build result to FAILURE

1

1 Answers

0
votes

Try the following, in the following order:

  • Try to upgrade the JRE version that you use to run the slave process
  • If you are using a JRE to run your slave, use a JDK If you are using
  • an OpenJDK, try with an Oracle JDK