Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

JA018: Hive action in oozie failed with null pointer exception

Highlighted

JA018: Hive action in oozie failed with null pointer exception

New Contributor

<---------------job.properties------------------------->

nameNode=hdfs://sample:8020

jobTracker=http://sample:8050 classpath oozie.use.system.libpath=true

oozie.libpath=${nameNode}/user/oozie/share/lib/lib_20170421164446

oozie.action.sharelib.for.hive=hive,hcatalog,sqoop,pig

###### Workflow ################## oozie.wf.application.path=${nameNode}/user/${user.name}/apps/oozie/oozie_job_sample/workflow/wf_sample.xml

####### Oozie Job Config: ################ property_file=${nameNode}/user/${user.name}/apps/oozie/oozie_job_sample/property_files hive_site_xml=${nameNode}/user/${user.name}/apps/oozie/oozie_job_sample/workflow/conf

##Hcat-hive action credentials

hcat_metastore_uri=thrift://server:9083

hcat_metastore_principal=hive/server@host.LAN

<--------------------workflow---------------------->

<?xml version="1.0" encoding="UTF-8"?>

<workflow-app xmlns="uri:oozie:workflow:0.5" name="wf_cca_sample">

<global>

<job-tracker>${jobTracker}</job-tracker>

<name-node>${nameNode}</name-node>

<job-xml>${hive_site_xml}/hive-site.xml</job-xml>

<configuration>

<property>

<name>oozie.hive.defaults</name>

<value>${hive_site_xml}/hive-site.xml</value>

</property>

<property>

<name>hive.execution.engine</name>

<value>tez</value>

</property>

</configuration>

</global>

<credentials>

<credential name="hcat-creds" type="hcat">

<property> <name>hcat.metastore.uri</name>

<value>${hcat_metastore_uri}</value> </property>

<property>

<name>hcat.metastore.principal</name>

<value>${hcat_metastore_principal}</value> </property>

</credential>

</credentials>

<start to="test_sample"/>

<action name="test_sample" cred="hcat-creds">

<hive xmlns="uri:oozie:hive2-action:0.4">

<job-tracker>${jobTracker}</job-tracker>

<name-node>${nameNode}</name-node>

<job-xml>${hive_site_xml}/hive-site.xml</job-xml>

<script>test_sample.sql</script>

</hive>

<ok to="end"/>

<error to="fail_email"/>

</action>

<kill name="fail_email">

<message>Daily Oozie workflow job for "sample_job" is failed , error message[${wf:errorMessage(wf:lastErrorNode())}]</message>

</kill>

<end name="end"/>

</workflow-app>

<---------------------error------------------------------------>

oozi-W] ACTION[0000004-170703113843812-oozie-oozi-W@test_sample] Launcher exception: java.lang.NullPointerException java.lang.RuntimeException: java.lang.NullPointerException at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:560) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) at org.apache.oozie.action.hadoop.HiveMain.runHive(HiveMain.java:336) at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:313) at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:58) at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:69) 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:497) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:239) 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.YarnChild$2.run(YarnChild.java:170) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164) Caused by: java.lang.NullPointerException at org.apache.hadoop.crypto.key.KeyProviderExtension.<init>(KeyProviderExtension.java:43) at org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.<init>(KeyProviderDelegationTokenExtension.java:97) at org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.createKeyProviderDelegationTokenExtension(KeyProviderDelegationTokenExtension.java:134) at org.apache.hadoop.hdfs.DistributedFileSystem.addDelegationTokens(DistributedFileSystem.java:2402) at org.apache.tez.common.security.TokenCache.obtainTokensForFileSystemsInternal(TokenCache.java:119) at org.apache.tez.common.security.TokenCache.obtainTokensForFileSystemsInternal(TokenCache.java:98) at org.apache.tez.common.security.TokenCache.obtainTokensForFileSystems(TokenCache.java:76) at org.apache.tez.client.TezClientUtils.setupTezJarsLocalResources(TezClientUtils.java:198) at org.apache.tez.client.TezClient.getTezJarResources(TezClient.java:831) at org.apache.tez.client.TezClient.start(TezClient.java:355) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:197) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:116) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:557) ... 19 more

Don't have an account?
Coming from Hortonworks? Activate your account here