java.lang.ClassNotFoundException: org.example.SQLContextApp

来源:5-2 -A SQLContext的使用

慕桂英2466209

2020-06-05

java.lang.ClassNotFoundException: org.example.SQLContextApp
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.spark.util.Utils.classForName(Utils.scala:230)atorg.apache.spark.deploy.SparkSubmit.classForName(Utils.scala:230) at org.apache.spark.deploy.SparkSubmit.classForName(Utils.scala:230)atorg.apache.spark.deploy.SparkSubmit.orgapacheapacheapachesparkdeploydeploydeploySparkSubmit$runMain(SparkSubmit.scala:712)atorg.apache.spark.deploy.SparkSubmitrunMain(SparkSubmit.scala:712) at org.apache.spark.deploy.SparkSubmitrunMain(SparkSubmit.scala:712)atorg.apache.spark.deploy.SparkSubmit.doRunMain1(SparkSubmit.scala:180)atorg.apache.spark.deploy.SparkSubmit1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit1(SparkSubmit.scala:180)atorg.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

scala的jar包找不到这个类,但是是按照视频的操作进行的

写回答

2回答

Michael_PK

2020-06-05

找不到类这种异常只有两个可能,一是你主类写错,而是jar里面没有这个类。都不存在第三个可能了

0
0

Michael_PK

2020-06-05

你自己打的jar里面有这个类吗?不是说我视频OK你们就OK的,你们环境万一和我的不一样呢

0
2
Michael_PK
回复
慕桂英2466209
jar打开看看
2020-06-05
共2条回复

以慕课网日志分析为例 进入大数据Spark SQL的世界

快速转型大数据:Hadoop,Hive,SparkSQL步步为赢

1644 学习 · 1129 问题

查看课程