【问题标题】:Jenkins-Maven Project - Could not initialize class org.apache.tools.ant.LocationJenkins-Maven 项目 - 无法初始化类 org.apache.tools.ant.Location
【发布时间】:2015-10-20 09:34:13
【问题描述】:

我收到一个错误,因为它无法初始化 ANT 位置,尽管它是一个 Maven 项目。

詹金斯的工作。

输出如下:

[htmlpublisher] 归档 HTML 报告... [htmlpublisher] 归档于 项目级别 C:\Jenkins\workspace\Capybaras-STAGE-Regression-OnDemand\target\dashboard-reports 到 /home/scmbuildmaster/.jenkins/jobs/Capybaras-STAGE-Regression-OnDemand/htmlreports/Dashboard_Full_Report_with_Screenshot 致命:HTML Publisher 失败 java.io.IOException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError:无法初始化类 org.apache.tools.ant.Location 在 hudson.FilePath.copyRecursiveTo(FilePath.java:2213) 在 hudson.FilePath.copyRecursiveTo(FilePath.java:2101) 在 hudson.FilePath.copyRecursiveTo(FilePath.java:2084) 在 htmlpublisher.HtmlPublisher.perform(HtmlPublisher.java:213) 在 hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 在 hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) 在 hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) 在 hudson.model.Build$BuildExecution.post2(Build.java:183) 在 hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) 在 hudson.model.Run.execute(Run.java:1784) 在 hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 在 hudson.model.ResourceController.execute(ResourceController.java:89) 在 hudson.model.Executor.run(Executor.java:240) 引起: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError:无法初始化类 org.apache.tools.ant.Location 在 hudson.remoting.Channel$3.adapt(Channel.java:784) 在 hudson.remoting.Channel$3.adapt(Channel.java:779) 在 hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) 在 hudson.FilePath.copyRecursiveTo(FilePath.java:2211) ... 12 更多 引起:java.lang.NoClassDefFoundError:无法初始化类 org.apache.tools.ant.Location 在 org.apache.tools.ant.ProjectComponent.(ProjectComponent.java:43) 在 org.apache.tools.ant.types.DataType.(DataType.java:40) 在 org.apache.tools.ant.types.AbstractFileSet.(AbstractFileSet.java:82) 在 org.apache.tools.ant.types.FileSet.(FileSet.java:36) 在 hudson.Util.createFileSet(Util.java:1077) 在 hudson.util.DirScanner$Glob.scan(DirScanner.java:124) 在 hudson.FilePath.writeToTar(FilePath.java:2249) 在 hudson.FilePath.access$2100(FilePath.java:191) 在 hudson.FilePath$45.invoke(FilePath.java:2190) 在 hudson.FilePath$45.invoke(FilePath.java:2186) 在 hudson.FilePath$FileCallableWrapper.call(FilePath.java:2665) 在 hudson.remoting.UserRequest.perform(UserRequest.java:121) 在 hudson.remoting.UserRequest.perform(UserRequest.java:49) 在 hudson.remoting.Request$2.run(Request.java:324) 在 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 在 java.util.concurrent.FutureTask.run(Unknown Source) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)在 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 ......远程调用 QA-Automation-Node(Native Method) 在 hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) 在 hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 在 hudson.remoting.Channel$3.adapt(Channel.java:782) ... 15 更多构建 步骤“发布 HTML 报告”将构建结果更改为 FAILURE

【问题讨论】:

    标签: maven ant jenkins


    【解决方案1】:

    按以下顺序尝试以下操作:

    • 尝试升级用于运行从属进程的 JRE 版本
    • 如果您使用 JRE 来运行从站,请使用 JDK 如果您正在使用
    • 一个 OpenJDK,试试 Oracle JDK

    【讨论】:

      猜你喜欢
      • 2021-09-09
      • 2017-01-14
      • 2020-08-29
      • 1970-01-01
      • 2020-12-21
      • 2015-05-22
      • 2021-12-30
      • 2019-06-19
      • 2020-12-22
      相关资源
      最近更新 更多