尘世壹俗人 2025-08-18 19:14 采纳率: 79.6%
浏览 11
已结题

编译spark报错,有人遇到过吗

在编译spark322时,遇到了一个半天没解决的问题,编译环境maven363,java8,scala2.12.15

执行脚本

./dev/make-distribution.sh --name dxm-mmr-spark --pip --tgz -Phive -Phive-thriftserver -Pyarn -Pscala-2.12

但是编译到catalyst模块的时候报错


[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.3.0:compile (scala-compile-first) on project spark-catalyst_2.12: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.3.0:compile failed: An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.3.0:compile: java.lang.BootstrapMethodError: call site initialization exception
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>net.alchim31.maven:scala-maven-plugin:4.3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/opt/maven-3.9.9/spark322_1/net/alchim31/maven/scala-maven-plugin/4.3.0/scala-maven-plugin-4.3.0.jar
[ERROR] urls[1] = file:/opt/maven-3.9.9/spark322_1/org/apache/maven/maven-builder-support/3.3.9/maven-builder-support-3.3.9.jar
[ERROR] urls[2] = file:/opt/maven-3.9.9/spark322_1/com/google/guava/guava/18.0/guava-18.0.jar
[ERROR] urls[3] = file:/opt/maven-3.9.9/spark322_1/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
。。。。下面还有很多[ERROR] urls[n] 
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>org.apache.spark:spark-parent_2.12:3.2.2, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : StackOverflowError
[ERROR] -> [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.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :spark-catalyst_2.12

就很费解,有什么解决方法吗

  • 写回答

7条回答 默认 最新

  • 尘世壹俗人 2025-08-19 11:42
    关注

    O!!!厚礼谢!!!!被一长段的jar异常误导了,忽略了StackOverflowError错误,编译进程栈溢出了-Xss4m就ok了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 8月19日
  • 已采纳回答 8月19日
  • 创建了问题 8月18日