Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.1, 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed
    • Tags:
      ant gen-test failed

      Description

      When I ran the commands introduced in Getting Started page, ant gen-test failed with the following error.

      $ ant gen-test
      Buildfile: /Users/sho/src/apache/hive/ql/build.xml

      test-conditions:
      [echo] Project: ql

      test-init:
      [echo] Project: ql
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientpositive
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientnegative
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/positive
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/negative
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/warehouse
      [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/metadb

      gen-test:
      [echo] ql
      [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
      [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
      [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
      [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParse.java from template TestParse.vm
      [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
      [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
      [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
      [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParseNegative.java from template TestParseNegative.vm
      [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
      [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
      [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
      [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/cli/TestCliDriver.java from template TestCliDriver.vm

      BUILD FAILED
      /Users/sho/src/apache/hive/ql/build.xml:116: Problem: failed to create task or type if
      Cause: The name is undefined.
      Action: Check the spelling.
      Action: Check that any custom tasks/types have been declared.
      Action: Check that any <presetdef>/<macrodef> declarations have taken place.

      Getting Started: https://cwiki.apache.org/confluence/display/Hive/GettingStarted+EclipseSetup

      1. HIVE-2904.1.patch
        0.6 kB
        tamtam180
      2. ASF.LICENSE.NOT.GRANTED--HIVE-2904.D2487.1.patch
        0.6 kB
        Phabricator
      3. ASF.LICENSE.NOT.GRANTED--HIVE-2904.D2487.2.patch
        0.6 kB
        Phabricator
      4. ASF.LICENSE.NOT.GRANTED--HIVE-2904.D2487.3.patch
        0.5 kB
        Phabricator
      5. ASF.LICENSE.NOT.GRANTED--HIVE-2904.D2925.1.patch
        2 kB
        Phabricator
      6. HIVE-2904.D2925.1.patch
        2 kB
        Carl Steinbach

        Activity

        Hide
        Ashutosh Chauhan added a comment -

        This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

        Show
        Ashutosh Chauhan added a comment - This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-2904 ant gen-test failed
        (Carl Stienbach via namit) (Revision 1331162)

        Result = ABORTED
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331162
        Files :

        • /hive/trunk/build.xml
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-2904 ant gen-test failed (Carl Stienbach via namit) (Revision 1331162) Result = ABORTED namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331162 Files : /hive/trunk/build.xml
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1400 (See https://builds.apache.org/job/Hive-trunk-h0.21/1400/)
        HIVE-2904 ant gen-test failed
        (Carl Stienbach via namit) (Revision 1331162)

        Result = FAILURE
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331162
        Files :

        • /hive/trunk/build.xml
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1400 (See https://builds.apache.org/job/Hive-trunk-h0.21/1400/ ) HIVE-2904 ant gen-test failed (Carl Stienbach via namit) (Revision 1331162) Result = FAILURE namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331162 Files : /hive/trunk/build.xml
        Hide
        Namit Jain added a comment -

        Committed. Thanks Carl

        Show
        Namit Jain added a comment - Committed. Thanks Carl
        Hide
        Namit Jain added a comment -

        +1

        Show
        Namit Jain added a comment - +1
        Hide
        Phabricator added a comment -

        cwsteinbach requested code review of "HIVE-2904 [jira] ant gen-test failed".
        Reviewers: ashutoshc, JIRA

        Add gen-test Ant target to top-level build.xml file.

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D2925

        AFFECTED FILES
        build.xml

        Show
        Phabricator added a comment - cwsteinbach requested code review of " HIVE-2904 [jira] ant gen-test failed". Reviewers: ashutoshc, JIRA Add gen-test Ant target to top-level build.xml file. TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D2925 AFFECTED FILES build.xml
        Hide
        Carl Steinbach added a comment -

        -1

        Running ant from any of the subproject directories is not supported. Also, ant-contrib taskdefs are already defined in the top-level build.xml file, and including them in subproject build files has caused problems in the past. Instead, we should add a gen-test target to the top-level build.xml file and define a default gen-test target in build-commom.xml.

        Show
        Carl Steinbach added a comment - -1 Running ant from any of the subproject directories is not supported. Also, ant-contrib taskdefs are already defined in the top-level build.xml file, and including them in subproject build files has caused problems in the past. Instead, we should add a gen-test target to the top-level build.xml file and define a default gen-test target in build-commom.xml.
        Hide
        Phabricator added a comment -

        ashutoshc has accepted the revision "HIVE-2904 [jira] ant gen-test failed".

        +1 will commit if tests pass.

        On a sidenote, looks like ant-contrib jar is checked-in the svn repo. Ideally, it should be pulled down from ivy and should not be repo. But that can be tracked in a separate issue.

        REVISION DETAIL
        https://reviews.facebook.net/D2487

        BRANCH
        svn

        Show
        Phabricator added a comment - ashutoshc has accepted the revision " HIVE-2904 [jira] ant gen-test failed". +1 will commit if tests pass. On a sidenote, looks like ant-contrib jar is checked-in the svn repo. Ideally, it should be pulled down from ivy and should not be repo. But that can be tracked in a separate issue. REVISION DETAIL https://reviews.facebook.net/D2487 BRANCH svn
        Hide
        tamtam180 added a comment -

        changed as follows

        • edit only ql/build.xml.
        • use to ant-contrib-1.0b3.jar from testlibs.
        Show
        tamtam180 added a comment - changed as follows edit only ql/build.xml. use to ant-contrib-1.0b3.jar from testlibs.
        Hide
        Phabricator added a comment -

        tamtam180 updated the revision "HIVE-2904 [jira] ant gen-test failed".
        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D2487

        AFFECTED FILES
        ql/build.xml

        Show
        Phabricator added a comment - tamtam180 updated the revision " HIVE-2904 [jira] ant gen-test failed". Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D2487 AFFECTED FILES ql/build.xml
        Hide
        Namit Jain added a comment -

        Otherwise, it looks good. Will commit after that

        Show
        Namit Jain added a comment - Otherwise, it looks good. Will commit after that
        Hide
        Namit Jain added a comment -

        1. You should use the ant-contrib-1.0b3.jar from testlibs.
        2. Yes, only change ql/build.xml

        Show
        Namit Jain added a comment - 1. You should use the ant-contrib-1.0b3.jar from testlibs. 2. Yes, only change ql/build.xml
        Hide
        tamtam180 added a comment -

        Hi,
        I have two questions.

        1.
        There is ant-contrib under ${hive.root}/testlibs.
        Refer to this or should not? (as ${hive.root}/build.xml)

        In ${hive.root}/build.xml

        77   <taskdef resource="net/sf/antcontrib/antcontrib.properties">
        78     <classpath>
        79       <pathelement location="${hive.root}/testlibs/ant-contrib-1.0b3.jar"/>
        80     </classpath>
        81   </taskdef>
        

        2.
        Used "<if>" In ${hive.root}/build-common.xml, and build-common.xml included from ${hive.root}/*/build.xml.
        But IfTask does not defined in build-common.xml.
        I think occur in the also ${hive.root}/*/build.xml.
        In this case, should I change only ql/build.xml?

        thanks.

        Show
        tamtam180 added a comment - Hi, I have two questions. 1. There is ant-contrib under ${hive.root}/testlibs. Refer to this or should not? (as ${hive.root}/build.xml) In ${hive.root}/build.xml 77 <taskdef resource="net/sf/antcontrib/antcontrib.properties"> 78 <classpath> 79 <pathelement location="${hive.root}/testlibs/ant-contrib-1.0b3.jar"/> 80 </classpath> 81 </taskdef> 2. Used "<if>" In ${hive.root}/build-common.xml, and build-common.xml included from ${hive.root}/*/build.xml. But IfTask does not defined in build-common.xml. I think occur in the also ${hive.root}/*/build.xml. In this case, should I change only ql/build.xml? thanks.
        Hide
        Srinivasan Sembakkam Rajivelu added a comment -

        For this error,

        You have to download Ant contrib file from http://ant-contrib.sourceforge.net/,

        And place this ant contrib file in ant installation directory,

        And add the following line,
        <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>

        to the build.xml file under <project name="ql" default="jar"> line.

        Your ant gen-test will work!!

        Show
        Srinivasan Sembakkam Rajivelu added a comment - For this error, You have to download Ant contrib file from http://ant-contrib.sourceforge.net/ , And place this ant contrib file in ant installation directory, And add the following line, <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> to the build.xml file under <project name="ql" default="jar"> line. Your ant gen-test will work!!
        Hide
        Srinivasan Sembakkam Rajivelu added a comment -

        For this error,

        You have to download Ant contrib file from http://ant-contrib.sourceforge.net/,

        And place this ant contrib file in ant installation directory,

        And add the following line,
        <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>

        to the build.xml file under <project name="ql" default="jar"> line.

        Your ant gen-test will work!!

        Show
        Srinivasan Sembakkam Rajivelu added a comment - For this error, You have to download Ant contrib file from http://ant-contrib.sourceforge.net/ , And place this ant contrib file in ant installation directory, And add the following line, <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> to the build.xml file under <project name="ql" default="jar"> line. Your ant gen-test will work!!
        Hide
        Phabricator added a comment -

        tamtam180 updated the revision "HIVE-2904 [jira] ant gen-test failed".
        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D2487

        AFFECTED FILES
        build-common.xml

        Show
        Phabricator added a comment - tamtam180 updated the revision " HIVE-2904 [jira] ant gen-test failed". Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D2487 AFFECTED FILES build-common.xml
        Hide
        Phabricator added a comment -

        tamtam180 requested code review of "HIVE-2904 [jira] ant gen-test failed".
        Reviewers: JIRA

        https://issues.apache.org/jira/browse/HIVE-2904

        add if-task define to build-common.xml.

        When I ran the commands introduced in Getting Started page, ant gen-test failed with the following error.

        $ ant gen-test
        Buildfile: /Users/sho/src/apache/hive/ql/build.xml

        test-conditions:
        [echo] Project: ql

        test-init:
        [echo] Project: ql
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientpositive
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientnegative
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/positive
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/negative
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/warehouse
        [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/metadb

        gen-test:
        [echo] ql
        [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
        [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
        [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
        [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParse.java from template TestParse.vm
        [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
        [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
        [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
        [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParseNegative.java from template TestParseNegative.vm
        [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates
        [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log
        [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates'
        [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/cli/TestCliDriver.java from template TestCliDriver.vm

        BUILD FAILED
        /Users/sho/src/apache/hive/ql/build.xml:116: Problem: failed to create task or type if
        Cause: The name is undefined.
        Action: Check the spelling.
        Action: Check that any custom tasks/types have been declared.
        Action: Check that any <presetdef>/<macrodef> declarations have taken place.

        Getting Started: https://cwiki.apache.org/confluence/display/Hive/GettingStarted+EclipseSetup

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D2487

        AFFECTED FILES
        ql/build.xml

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/5571/

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - tamtam180 requested code review of " HIVE-2904 [jira] ant gen-test failed". Reviewers: JIRA https://issues.apache.org/jira/browse/HIVE-2904 add if-task define to build-common.xml. When I ran the commands introduced in Getting Started page, ant gen-test failed with the following error. $ ant gen-test Buildfile: /Users/sho/src/apache/hive/ql/build.xml test-conditions: [echo] Project: ql test-init: [echo] Project: ql [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientpositive [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/clientnegative [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/positive [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/logs/negative [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/warehouse [mkdir] Created dir: /Users/sho/src/apache/hive/build/ql/test/data/metadb gen-test: [echo] ql [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates' [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParse.java from template TestParse.vm [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates' [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/ql/parse/TestParseNegative.java from template TestParseNegative.vm [qtestgen] Template Path:/Users/sho/src/apache/hive/ql/src/test/templates [qtestgen] 2012/03/25 15:27:10 org.apache.velocity.runtime.log.JdkLogChute log [qtestgen] ???: FileResourceLoader : adding path '/Users/sho/src/apache/hive/ql/src/test/templates' [qtestgen] Generated /Users/sho/src/apache/hive/build/ql/test/src/org/apache/hadoop/hive/cli/TestCliDriver.java from template TestCliDriver.vm BUILD FAILED /Users/sho/src/apache/hive/ql/build.xml:116: Problem: failed to create task or type if Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. Getting Started: https://cwiki.apache.org/confluence/display/Hive/GettingStarted+EclipseSetup TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D2487 AFFECTED FILES ql/build.xml MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/5571/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.
        Hide
        tamtam180 added a comment -

        added if-task define to build-common.xml.

        Show
        tamtam180 added a comment - added if-task define to build-common.xml.

          People

          • Assignee:
            tamtam180
            Reporter:
            Sho Shimauchi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development