Hive
  1. Hive
  2. HIVE-1188

NPE when running TestJdbcDriver/TestHiveServer

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Tags:
      git

      Description

      % ant test -Dtestcase=TestJdbcDriver
      
      BUILD FAILED
      /Users/carl/Projects/hive/hd11/hive/build.xml:154: The following error occurred while executing this line:
      /Users/carl/Projects/hive/hd11/hive/build.xml:93: The following error occurred while executing this line:
      /Users/carl/Projects/hive/hd11/hive/contrib/build.xml:77: java.lang.NullPointerException
      	at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
      	at java.util.Arrays.asList(Arrays.java:3343)
      	at org.apache.hadoop.hive.ant.QTestGenTask.execute(QTestGenTask.java:248)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
      	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
      	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
      	at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
      	at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
      	at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
      	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
      	at org.apache.tools.ant.Main.runBuild(Main.java:801)
      	at org.apache.tools.ant.Main.startAnt(Main.java:218)
      	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      

      TestHiveServer throws the same error.

      1. HIVE-1188.2.patch
        5 kB
        Carl Steinbach
      2. HIVE-1188.patch
        2 kB
        Carl Steinbach

        Issue Links

          Activity

          Hide
          Ning Zhang added a comment -

          I do not have this NPE on the latest trunk. But I did see errors for -Dstandalone=true. I'm looking into that.

          Show
          Ning Zhang added a comment - I do not have this NPE on the latest trunk. But I did see errors for -Dstandalone=true. I'm looking into that.
          Hide
          Carl Steinbach added a comment -

          Git does recognize empty directories. People who use the git mirror of the Hive subversion repository will not see the empty directories that exist in the Hive source tree, and as a result tests such as TestJdbcDriver and TestHiveServer will fail since they are unable to find the empty qfile directories that appear under contrib and ql. Following the advice given here this patch adds a .gitignore file to each of the empty directories in the Hive source tree in order to force Git to create these directories.

          Show
          Carl Steinbach added a comment - Git does recognize empty directories . People who use the git mirror of the Hive subversion repository will not see the empty directories that exist in the Hive source tree, and as a result tests such as TestJdbcDriver and TestHiveServer will fail since they are unable to find the empty qfile directories that appear under contrib and ql. Following the advice given here this patch adds a .gitignore file to each of the empty directories in the Hive source tree in order to force Git to create these directories.
          Hide
          Ning Zhang added a comment -

          +1. Will commit if tests pass.

          Show
          Ning Zhang added a comment - +1. Will commit if tests pass.
          Hide
          Ning Zhang added a comment -

          Carl, I got the following error when I apply your patch.

          patch -p0 -i ~/patches/HIVE-1188.patch
          patch: **** Only garbage was found in the patch input.

          It seems svn doesn't like the empty .gitignore file. Can you add some dummy lines in .gitignore to make it work?

          Show
          Ning Zhang added a comment - Carl, I got the following error when I apply your patch. patch -p0 -i ~/patches/ HIVE-1188 .patch patch: **** Only garbage was found in the patch input. It seems svn doesn't like the empty .gitignore file. Can you add some dummy lines in .gitignore to make it work?
          Hide
          Carl Steinbach added a comment -

          Add a comment to each .gitignore file explaining its purpose.

          Show
          Carl Steinbach added a comment - Add a comment to each .gitignore file explaining its purpose.
          Hide
          Carl Steinbach added a comment -

          Can you add some dummy lines in .gitignore to make it work?

          Fixed.

          Show
          Carl Steinbach added a comment - Can you add some dummy lines in .gitignore to make it work? Fixed.
          Hide
          Ning Zhang added a comment -

          Committed to branch-0.5 and trunk. Thanks Carl!

          Show
          Ning Zhang added a comment - Committed to branch-0.5 and trunk. Thanks Carl!
          Hide
          Carl Steinbach added a comment -

          Not backported to 0.5.0

          Show
          Carl Steinbach added a comment - Not backported to 0.5.0

            People

            • Assignee:
              Carl Steinbach
              Reporter:
              Carl Steinbach
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development