1 Reply Latest reply: Mar 6, 2012 12:29 PM by 251301 RSS

    NPE while running Oracle Loader for Hadoop

    920541
      Hi everyone,
      I am trying to export a hive table named 'test' into Oracle RDBMS table 'TEST' which is partitioned.

      I created the table using :
      create table TEST (FOO number(10),FOO2 varchar2(100))
      PARTITION BY RANGE(FOO)
      (
      PARTITION test_p1 VALUES LESS THAN(500),
      PARTITION test_p2 VALUES LESS THAN(1000),
      PARTITION test_p3 VALUES LESS THAN(MAXVALUE)
      );

      My hive's table name is 'test' in 'default' database.

      I am getting following error:

      $ bin/hadoop jar oraloader.jar oracle.hadoop.loader.OraLoader -conf test_oraloader_conf.xml -fs hdfs://hadoop-namenode:9000 -jt hadoop-namenode:9001
      Oracle Loader for Hadoop Release 1.1.0.0.1 - Production

      Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.

      12/02/29 15:44:48 INFO loader.OraLoader: Oracle Loader for Hadoop Release 1.1.0.0.1 - Production

      Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.

      Exception in thread "main" java.lang.NullPointerException
      at java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
      at oracle.hadoop.loader.DBPartition$VarLenDecoderIterator.<init>(DBPartition.java:809)
      at oracle.hadoop.loader.DBPartition.decodeVariableLengthEncodedList(DBPartition.java:791)
      at oracle.hadoop.loader.DBKey.parseHiboundVal(DBKey.java:114)
      at oracle.hadoop.loader.DBStaticRangePartition.<init>(DBStaticRangePartition.java:88)
      at oracle.hadoop.loader.DBPartition.getStrategy(DBPartition.java:381)
      at oracle.hadoop.loader.DBPartition.<init>(DBPartition.java:242)
      at oracle.hadoop.loader.OraLoader.checkRuntime(OraLoader.java:190)
      at oracle.hadoop.loader.OraLoader.run(OraLoader.java:375)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
      at oracle.hadoop.loader.OraLoader.main(OraLoader.java:734)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:186)

      Please help on this. Thanks in advance.

      Regards,
      Rakesh Kumar Rakshit
        • 1. Re: NPE while running Oracle Loader for Hadoop
          251301
          Rakesh,

          What version of the database are you running? Do you have the required patch installed for your version?

          http://docs.oracle.com/cd/E27101_01/doc.10/e27365/start.htm#CHDIJGJD

          A target database system running one of the following:
          Oracle Database 10g Release 2 (10.2.0.5) with required patch
          Oracle Database 11g Release 2 (11.2.0.2) with required patch
          Oracle Database 11g Release 2 (11.2.0.3)

          Note:
          To use Oracle Loader for Hadoop with Oracle Database 10g Release 2 (10.2.0.5) or Oracle Database 11g Release 2 (11.2.0.2), you must first apply a one-off patch that addresses bug number 11897896. To access this patch, go to http://support.oracle.com and search for the bug number.