You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/08/03 05:48:50 UTC
[orc] branch branch-1.7 updated: ORC-902: Fix hadoop-common
dependency scope in orc-example (#808)
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.7 by this push:
new f0f005a ORC-902: Fix hadoop-common dependency scope in orc-example (#808)
f0f005a is described below
commit f0f005aa69c7e9ead016b8753208ce97d29b2176
Author: guiyanakaung <gu...@gmail.com>
AuthorDate: Tue Aug 3 13:48:01 2021 +0800
ORC-902: Fix hadoop-common dependency scope in orc-example (#808)
### What changes were proposed in this pull request?
run orc-example, Throw an exception
```log
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 7 more
```
mvn dependency:tree in orc-example
```log
...
[INFO] +- org.apache.hadoop:hadoop-common:jar:2.2.0:provided
...
```
Need to set scope to compile in orc-example/pom.xml
### Why are the changes needed?
The example of orc-example cannot be run
### How was this patch tested?
Manual.
(cherry picked from commit a512329cee6d42179a3165ca3302247cf1ec269a)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
java/examples/pom.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/java/examples/pom.xml b/java/examples/pom.xml
index d90bb38..91cadb3 100644
--- a/java/examples/pom.xml
+++ b/java/examples/pom.xml
@@ -50,10 +50,12 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>