浪费了我好长时间查找错误源头,百度终无果,最终解决办法:
1.Mark Directory as 给予scala一个Source root(变成蓝色的) 2.修改pom.xml配置文件
复制代码 4.0.0 com.etc spark-sql 1.0-SNAPSHOT 2.10.6 UTF-8 org.scala-lang scala-library ${scala.version} junit junit 3.8.1 test org.apache.spark spark-core_2.10 1.5.1 org.apache.spark spark-sql_2.10 1.5.1 org.apache.spark spark-hive_2.10 1.5.1 org.apache.spark spark-streaming_2.10 1.5.1 org.apache.hadoop hadoop-client 2.4.1 org.apache.spark spark-streaming-kafka_2.10 1.5.1 org.apache.spark spark-streaming-flume_2.10 1.5.1 mysql mysql-connector-java 8.0.11 org.apache.hive hive-jdbc 0.13.0 org.apache.httpcomponents httpclient 4.4.1 org.apache.httpcomponents httpcore 4.4.1 src/main/java src/main/ maven-assembly-plugin jar-with-dependencies make-assembly package single org.codehaus.mojo exec-maven-plugin 1.2.1 exec java true false compile cn.spark.study.App org.apache.maven.plugins maven-compiler-plugin net.alchim31.maven scala-maven-plugin 3.2.2 compile testCompile -dependencyfile ${project.build.directory}/.scala_dependencies org.apache.maven.plugins maven-shade-plugin 2.4.3 package shade /execution> *:* META-INF/*.SF META-INF/*.DSA META-INF/*.RSA reference.conf cn.itcast.rpc.Master