Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - antlr problem while unit testing


Copy link to this message
-
antlr problem while unit testing
Anandha L Ranganathan 2013-02-08, 19:32
I am facing the problem  while running unit tests using command line.

I modified the code and started testing it started throwing an exception.
The  command I used was,

ant test -Dtestcase=TestCliDriver -Dqfile=alter1.q.

I do have both antlr-running 3.1 and 3.4 version

  </properties>
  <error message="org.antlr.runtime.Lexer.<init>(Lorg/antlr/runtime/CharStream;Lorg/antlr/runtime/RecognizerSharedState;)V"
type="java.lang.NoSuchMethodError">java.lang.NoSuchMethodError:
org.antlr.runtime.Lexer.<init>(Lorg/antlr/runtime/CharStream;Lorg/antlr/runtime/RecognizerSharedState;)V

        at org.apache.hadoop.hive.ql.parse.HiveLexer.<init>(HiveLexer.java:552)
        at org.apache.hadoop.hive.ql.parse.HiveLexer.<init>(HiveLexer.java:549)
        at org.apache.hadoop.hive.ql.parse.ParseDriver$HiveLexerX.<init>(ParseDriver.java:264)

        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:435)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:416)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335)

        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:898)
        at org.apache.hadoop.hive.ql.QTestUtil.runLoadCmd(QTestUtil.java:530)
        at org.apache.hadoop.hive.ql.QTestUtil.createSources(QTestUtil.java:577)

        at org.apache.hadoop.hive.cli.TestCliDriver.<clinit>(TestCliDriver.java:49)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:373)

        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
</error>

  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[Hive history
file=/home/analog76/sourcecode/hive/trunk/build/ql/tmp/hive_job_log_analog76_201302080827_2054244118.txt

Hive history file=/home/analog76/sourcecode/hive/trunk/build/ql/tmp/hive_job_log_analog76_201302080827_1750183265.txt
]]></system-err>

It works fine in eclipse and I  am able to run or debug  the unit test
cases. But when I run it in command line it gives  problem.