java.lang.ClassNotFoundException: org.antlr.runtime.CommonToken

JIRA | Deepak Shivamurthy | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd , Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    I am trying to query mongodb collection from hive; select userId, name from demo; running fine select userId, name from demo where name = 'xyz'; fails with below error message; jars used; mongo-hadoop-core-1.4.0.jar; mongo-hadoop-hive-1.4.0.jar; mongo-java-driver-3.0.2.jar; mongodb version 2.6, cdh4 ---------- Diagnostic Messages for this Task: Error: java.lang.ClassNotFoundException: org.antlr.runtime.CommonToken at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.hadoop.hive.ql.exec.Utilities.serializeExpression(Utilities.java:445) at org.apache.hadoop.hive.ql.io.HiveInputFormat.pushFilters(HiveInputFormat.java:359) at org.apache.hadoop.hive.ql.io.HiveInputFormat.pushProjectionsAndFilters(HiveInputFormat.java:432) at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:233) at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getRecordReader(CombineHiveInputFormat.java:522) at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:166) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:407) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:160) 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:1438) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:155) FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask ----------

    JIRA | 2 years ago | Deepak Shivamurthy
    java.lang.ClassNotFoundException: org.antlr.runtime.CommonToken
  2. 0

    I am trying to query mongodb collection from hive; select userId, name from demo; running fine select userId, name from demo where name = 'xyz'; fails with below error message; jars used; mongo-hadoop-core-1.4.0.jar; mongo-hadoop-hive-1.4.0.jar; mongo-java-driver-3.0.2.jar; mongodb version 2.6, cdh4 ---------- Diagnostic Messages for this Task: Error: java.lang.ClassNotFoundException: org.antlr.runtime.CommonToken at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.hadoop.hive.ql.exec.Utilities.serializeExpression(Utilities.java:445) at org.apache.hadoop.hive.ql.io.HiveInputFormat.pushFilters(HiveInputFormat.java:359) at org.apache.hadoop.hive.ql.io.HiveInputFormat.pushProjectionsAndFilters(HiveInputFormat.java:432) at org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:233) at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getRecordReader(CombineHiveInputFormat.java:522) at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:166) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:407) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:160) 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:1438) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:155) FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask ----------

    JIRA | 2 years ago | Deepak Shivamurthy
    java.lang.ClassNotFoundException: org.antlr.runtime.CommonToken
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  5. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>

  1. osvzs 4 times, last 6 days ago
  2. olle.hallin 3 times, last 2 days ago
  3. rp 1 times, last 1 week ago
  4. Dunmer 1 times, last 2 weeks ago
  5. poroszd 1 times, last 2 weeks ago
78 more registered users
17 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.antlr.runtime.CommonToken

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    4 frames
  3. Hive Query Language
    CombineHiveInputFormat.getRecordReader
    1. org.apache.hadoop.hive.ql.exec.Utilities.serializeExpression(Utilities.java:445)
    2. org.apache.hadoop.hive.ql.io.HiveInputFormat.pushFilters(HiveInputFormat.java:359)
    3. org.apache.hadoop.hive.ql.io.HiveInputFormat.pushProjectionsAndFilters(HiveInputFormat.java:432)
    4. org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat.java:233)
    5. org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getRecordReader(CombineHiveInputFormat.java:522)
    5 frames
  4. Hadoop
    YarnChild$2.run
    1. org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:166)
    2. org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:407)
    3. org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
    4. org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:160)
    4 frames
  5. Java RT
    Subject.doAs
    1. java.security.AccessController.doPrivileged(Native Method)
    2. javax.security.auth.Subject.doAs(Subject.java:422)
    2 frames
  6. Hadoop
    UserGroupInformation.doAs
    1. org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
    1 frame
  7. Hadoop
    YarnChild.main
    1. org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:155)
    1 frame