Thank you Peter, it's helpful. I installed sharelib via command: su -l oozie -c "${OOZIE_HOME}/bin/oozie-setup.sh sharelib create -fs hdfs://localhost:9000"
and there are some jars but hive-exec.jar is not there (hive-exec.jar is in /lib/lib_xxx/hive not int /lib/lib_xxx/hive2). How can I install the latest sharelib? I'm not using CDH. ________________________________ 发件人: Peter Cseh <gezap...@cloudera.com> 发送时间: 2016年9月9日 15:45:49 收件人: user@oozie.apache.org 主题: Re: Launcher exception: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf Hi, It looks like the org.apache.hadoop.hive.conf.HiveConf class is missing from the classpath when the action runs. Can you check the output of the oozie admin -shareliblist hive2 and check that the hive-exec.jar is there? You can find more information about the sharelib and how to install it here <http://blog.cloudera.com/blog/2014/05/how-to-use-the-sharelib-in-apache-oozie-cdh-5/> . Peter On Fri, Sep 9, 2016 at 6:35 AM, Huang Meilong <ims...@outlook.com> wrote: > Hello, > > > I'm using oozie 4.2.0 on a HA cluster, I got a launcher exception when I > run the oozie example app hive2: > > > 2016-09-09 10:10:44,927 WARN Hive2ActionExecutor:523 - > SERVER[emr-header-1.cluster-500031470] USER[oozie] GROUP[-] TOKEN[] > APP[hive2-wf] JOB[0000004-160908174647725-oozie-oozi-W] ACTION[0000004- > 160908174647725-oozie-oozi-W@hive2-node] Launcher ERROR, reason: Main > class [org.apache.oozie.action.hadoop.Hive2Main], main() threw exception, > org/apache/hadoop/hive/conf/HiveConf > 2016-09-09 10:10:44,931 WARN Hive2ActionExecutor:523 - > SERVER[emr-header-1.cluster-500031470] USER[oozie] GROUP[-] TOKEN[] > APP[hive2-wf] JOB[0000004-160908174647725-oozie-oozi-W] ACTION[0000004- > 160908174647725-oozie-oozi-W@hive2-node] Launcher exception: > org/apache/hadoop/hive/conf/HiveConf > java.lang.NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf > at org.apache.oozie.action.hadoop.Hive2Main.runBeeline(Hive2Main.java:240) > at org.apache.oozie.action.hadoop.Hive2Main.run(Hive2Main.java:223) > at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47) > at org.apache.oozie.action.hadoop.Hive2Main.main(Hive2Main.java:56) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.oozie.action.hadoop.LauncherMapper.map( > LauncherMapper.java:236) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) > at org.apache.hadoop.mapred.LocalContainerLauncher$ > EventHandler.runSubtask(LocalContainerLauncher.java:380) > at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask( > LocalContainerLauncher.java:301) > at org.apache.hadoop.mapred.LocalContainerLauncher$ > EventHandler.access$200(LocalContainerLauncher.java:187) > at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run( > LocalContainerLauncher.java:230) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker( > ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf. > HiveConf > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > ... 21 more > > job definition: > > > <?xml version="1.0" encoding="UTF-8"?> > <!-- > Licensed to the Apache Software Foundation (ASF) under one > or more contributor license agreements. See the NOTICE file > distributed with this work for additional information > regarding copyright ownership. The ASF licenses this file > to you under the Apache License, Version 2.0 (the > "License"); you may not use this file except in compliance > with the License. You may obtain a copy of the License at > > http://www.apache.org/licenses/LICENSE-2.0 > > Unless required by applicable law or agreed to in writing, software > distributed under the License is distributed on an "AS IS" BASIS, > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > See the License for the specific language governing permissions and > limitations under the License. > --> > <workflow-app xmlns="uri:oozie:workflow:0.5" name="hive2-wf"> > <start to="hive2-node"/> > > <action name="hive2-node"> > <hive2 xmlns="uri:oozie:hive2-action:0.1"> > <job-tracker>${jobTracker}</job-tracker> > <name-node>${nameNode}</name-node> > <prepare> > <delete path="${nameNode}/user/${wf: > user()}/${examplesRoot}/output-data/hive2"/> > <mkdir path="${nameNode}/user/${wf: > user()}/${examplesRoot}/output-data"/> > </prepare> > <configuration> > <property> > <name>mapred.job.queue.name</name> > <value>${queueName}</value> > </property> > </configuration> > <jdbc-url>${jdbcURL}</jdbc-url> > <script>script.q</script> > <param>INPUT=/user/${wf:user()}/${examplesRoot}/input-data/ > table</param> > <param>OUTPUT=/user/${wf:user()}/${examplesRoot}/output- > data/hive2</param> > </hive2> > <ok to="end"/> > <error to="fail"/> > </action> > > <kill name="fail"> > <message>Hive2 (Beeline) action failed, error > message[${wf:errorMessage(wf:lastErrorNode())}]</message> > </kill> > <end name="end"/> > </workflow-app> > > job configuration: > > > <configuration> > <property> > <name>examplesRoot</name> > <value>examples</value> > </property> > <property> > <name>oozie.wf.application.path</name> > <value>hdfs://emr-cluster/user/oozie/examples/apps/hive2</value> > </property> > <property> > <name>oozie.use.system.libpath</name> > <value>true</value> > </property> > <property> > <name>queueName</name> > <value>default</value> > </property> > <property> > <name>jdbcURL</name> > <value>jdbc:hive2://localhost:10000/default</value> > </property> > <property> > <name>user.name</name> > <value>oozie</value> > </property> > <property> > <name>jobTracker</name> > <value>rm1,rm2</value> > </property> > <property> > <name>mapreduce.job.user.name</name> > <value>oozie</value> > </property> > <property> > <name>nameNode</name> > <value>hdfs://emr-cluster</value> > </property> > </configuration> > > > > How can I fix this error, can you give me a hand, thanks in advance! > > -- Peter Cseh Software Engineer <http://www.cloudera.com>