Mac OS Hadoop:线程中的异常;“主要”;java.io.FileNotFoundException

Mac OS Hadoop:线程中的异常;“主要”;java.io.FileNotFoundException,hadoop,bigdata,Hadoop,Bigdata,在Hadoop中运行jar文件时,我遇到了一个问题 在终端中,我得到以下异常: Exception in thread "main" java.io.FileNotFoundException: /var/folders/5_/hxmqt1090j1g1tqm485hr7tw0000gn/T/hadoop-unjar898783490589040837/META-INF/LICENSE (Is a directory) 如何解决这个问题?我遇到了这个问题,我的代码是用scala编写的,我想用以

在Hadoop中运行jar文件时,我遇到了一个问题

在终端中,我得到以下异常:

Exception in thread "main" java.io.FileNotFoundException: /var/folders/5_/hxmqt1090j1g1tqm485hr7tw0000gn/T/hadoop-unjar898783490589040837/META-INF/LICENSE (Is a directory)

如何解决这个问题?

我遇到了这个问题,我的代码是用scala编写的,我想用以下命令在hadoop上运行jar: 比如:

It报告错误: 线程“main”java.io.FileNotFoundException:/var/folders/dy/kgryx_f11g1fdqpcnc8jl中出现异常 m840000gp/T/hadoop-unjar5812913115154946721/META-INF/LICENSE(是一个目录)

我根据 现在解决了

我的maven shade插件配置如下:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <minimizeJar>true</minimizeJar>
                        <!-- <shadedArtifactAttached>true</shadedArtifactAttached>-->
                        <transformers>
                            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                            </transformer>
                        </transformers>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>log4j.properties</exclude>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                    <exclude>META-INF/LICENSE*</exclude>
                                    <exclude>license/*</exclude>
                                </excludes>
                            </filter>
                            <filter>
                                <artifact>com.typesafe.akka</artifact>
                                <includes>
                                    <include>reference.conf</include>
                                </includes>
                            </filter>
                        </filters>
                    </configuration>
                </execution>
            </executions>
        </plugin>

org.apache.maven.plugins
maven阴影插件
2.4.3
包裹
阴凉处
真的
*:*
log4j.properties
META-INF/*.SF
META-INF/*.DSA
META-INF/*.RSA
META-INF/许可证*
许可证/*
com.typesafe.akka
reference.conf
如果我添加true,它将报告scala类未找到,注释掉这个配置。
祝你好运。

以下内容可能重复
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <minimizeJar>true</minimizeJar>
                        <!-- <shadedArtifactAttached>true</shadedArtifactAttached>-->
                        <transformers>
                            <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                            </transformer>
                        </transformers>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>log4j.properties</exclude>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                    <exclude>META-INF/LICENSE*</exclude>
                                    <exclude>license/*</exclude>
                                </excludes>
                            </filter>
                            <filter>
                                <artifact>com.typesafe.akka</artifact>
                                <includes>
                                    <include>reference.conf</include>
                                </includes>
                            </filter>
                        </filters>
                    </configuration>
                </execution>
            </executions>
        </plugin>