zoukankan      html  css  js  c++  java
  • Idea中运行SparkCore程序报错问题解决

    在运行程序打包过程中,出现如下错误:

    [ERROR] Command execution failed.
    org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
        at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
        at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
        at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
        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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
        at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  1.688 s
    [INFO] Finished at: 2021-06-03T09:49:27+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default-cli) on project TestSpark: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    解决方案:

      第一步:遇到问题不要慌,不要一上来就去面向百度编程,先仔细阅读错误原因,一步步排查,通过以上错误我们可以看到Maven在打包时发生 Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default-cli) on project TestSpark ,也就是说程序打包不起来,原因也许是插件版本冲突,也有可能是编译报错

      第二步:先查看是否属于编译报错

      第三步:查看Build日志信息,找出错误

      第四步:再次运行程序,发现打包成功(总结:一定要把报错信息翻译出来,阅读一遍,然后找出报错的位置并解决它,而不是马上就 www.baidu.com )

  • 相关阅读:
    一些问题
    为什么Python在列表,元组和字典的末尾允许使用逗号?
    #!/bin/bash
    gitbook 入门教程之小白都能看懂的 Gitbook 插件开发全流程
    go 学习笔记之10 分钟简要理解 go 语言闭包技术
    gitbook 入门教程之还在搞公众号互推涨粉?gitbook 集成导流工具,轻轻松松躺增粉丝!
    go 学习笔记之仅仅需要一个示例就能讲清楚什么闭包
    go 学习笔记之学习函数式编程前不要忘了函数基础
    go 学习笔记之无心插柳柳成荫的接口和无为而治的空接口
    go 学习笔记之万万没想到宠物店竟然催生出面向接口编程?
  • 原文地址:https://www.cnblogs.com/LzMingYueShanPao/p/14844051.html
Copyright © 2011-2022 走看看