After you create a new maven, configure the Pom.xml file to import Spark's jar package with a red exclamation mark

Source: Internet
Author: User

It is also possible to consult a lot of relevant data, such as configuring Tomcat, setting up the JDK, and so on before really solving the red exclamation point problem. However, the final solution is the reason why the jar package does not have a result import.

Configure the Pom.xml file to automatically import spark jar packages by creating a MAVEN project
Problems displays the error message as follows:

Error message 1:description Resource Path location Type
Archive for Required library: ' e:/java/apache-maven-3.0.4-bin/apache-maven-3.0.4/org/spark-project/akka/ Akka-remote_2.10/2.3.4-spark/akka-remote_2.10-2.3.4-spark.jar ' in project ' HelloWorld2 ' cannot be read or was not a valid Z IP file HelloWorld2 Build Path build path problem
Error message 2:description Resource Path location Type
The project cannot be built until build path errors is resolved helloworld2 Unknown Java problem

From the error message, it may be that the path is out of the question
After the introduction of the doctrine, I learned that the problem is the JAR package import
cause of error:
the Maven plugin did not successfully download the associated jar package
Solution:
Manually import the required jar packages yourself
Here's where Spark's jar bag is.
The screenshot shows:

Such as:
All I need is Spark's relevant jar package.
The configuration information added by the configuration file Pom.xml is as follows:

<dependency>

            <groupId>org.apache.spark</groupId>

            <artifactid>spark-core_2.10 </artifactId>

            <version>1.6.2</version>

        </dependency>

        <dependency>

        <groupId>org.apache.spark</groupId>

        <artifactId>spark-sql_2.10</artifactId>

        <version>1.6.2</version>

        </dependency>
        <dependency>

            <groupId> org.apache.hadoop</groupid>

            <artifactId>hadoop-client</artifactId>

            <version> 2.6.0</version>

Under MAVEN's library file, mine is .... \apache-maven-3.0.4\maven-dependencies\org\apache\, create a new Spark folder
So the spark 1.6.2 corresponding jar package is manually added to the \org\apache\spark, and the red exclamation mark can be resolved by re-refreshing the configuration file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.