Home > other >  Spark - submit always can not find the main class of the class
Spark - submit always can not find the main class of the class

Time:10-08



This is my pom. XML

<? The XML version="1.0" encoding="utf-8"?>
XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" & gt;
4.0.0 & lt;/modelVersion>

3.2.1 & lt;/hadoop. Version>
3.0.0 - preview2 & lt;/spark. Version>
2.12.10 & lt;/scala. Version>

Org. Example
Kafkademo
1.0 - SNAPSHOT


Org. Apache. Hadoop
Hadoop - client
3.2.1 & lt;/version>


Org. Apache. Spark
The spark - streaming_2. 12 & lt;/artifactId>
3.0.0 - preview2 & lt;/version>


Hadoop - client
Org. Apache. Hadoop




Org. Apache. Spark
Spark - streaming - kafka - 0-10 _2. 12 & lt;/artifactId>
3.0.0 - preview2 & lt;/version>


Org. Apache. Kafka
Kafka - clients
2.3.1 & lt;/version>


Mysql
Mysql connector - java
5.1.29 & lt;/version>


Com. Google. Code. Gson
Gson
2.8.5 & lt;/version>


Org. Apache. Spark
The spark - sql_2. 12 & lt;/artifactId>
3.0.0 - preview2 & lt;/version>


Org. Apache. Kafka
Kafka_2. 12 & lt;/artifactId>
2.3.1 & lt;/version>





Org. Scala - tools
Maven scala - plugin
2.15.2 & lt;/version>



Compile
TestCompile





Maven - compiler - plugin
3.6.0 & lt;/version>

1.8 & lt;/source>
1.8 & lt;/target>



Org, apache maven. Plugins
Maven - surefire - plugin
2.19 & lt;/version>

True







After using the IDE is the IDEA, Build artifacts can't submit the jar package,

CodePudding user response:

Your class name is called the test? Or a test package, - class parameter to specify the class names

CodePudding user response:

I have already solved, as long as it is the cause of the package, and the groupid and ArtifactID as same as the name of the package
  • Related