Error:scalac: missing or invalid dependency detected while loading class file 'Tensor.class'.

Cynthia ·
更新时间:2024-11-13
· 616 次阅读

使用idea maven配置spark项目时遇到下面错误

Error:scalac: missing or invalid dependency detected while loading class file 'Tensor.class'. Could not access term mllib in package org.apache.spark, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) A full rebuild may help if 'Tensor.class' was compiled against an incompatible version of org.apache.spark.

更改pom.xml spark-mllib依赖更改为如下内容

org.apache.spark spark-mllib_2.11 2.3.1 <!-- runtime-->

注意,也就是注释掉

<!-- runtime-->
作者:learning_xin



WHILE file tensor class loading error

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章