pig 0.14-线程“main”java.lang.noclassdeffounderror中出现异常:org/antlr/runtime/recognitionexception

kulphzqa  于 2021-06-04  发布在  Hadoop
关注(0)|答案(0)|浏览(259)

尝试使用hadoop 1.1.2运行pig 0.14时收到错误:

Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getMethod0(Class.java:2764)
at java.lang.Class.getMethod(Class.java:1653)
at org.apache.hadoop.util.RunJar.main(RunJar.java:150)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more

我可以确认antlr运行时存在于pig-0.14.0/lib目录中,并且在运行pig shell脚本时,我的环境变量配置正在生成正确的$hadoop\u类路径。运行清管器时使用 pig -printCmdDebug debug选项时,将生成以下输出,显示antlr库位于$hadoop\u类路径中。感谢您的帮助。

dry run:
HADOOP_CLASSPATH: /home/hadoop/hbase-0.94.10/conf:/home/hadoop/pig-0.14.0/bin/../conf:/usr/java/default/lib/tools.jar:/etc/hadoop:/usr/share/hadoop:/home/hadoop/pig-0.14.0/lib:/etc/hadoop:/home/hadoop/pig-0.14.0/bin/../lib/accumulo-core-1.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/accumulo-fate-1.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/accumulo-server-1.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/accumulo-start-1.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/accumulo-trace-1.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/antlr-runtime-3.4.jar:/home/hadoop/pig-0.14.0/bin/../lib/asm-3.3.1.jar:/home/hadoop/pig-0.14.0/bin/../lib/automaton-1.11-8.jar:/home/hadoop/pig-0.14.0/bin/../lib/avro-1.7.5.jar:/home/hadoop/pig-0.14.0/bin/../lib/avro-tools-1.7.5-nodeps.jar:/home/hadoop/pig-0.14.0/bin/../lib/groovy-all-1.8.6.jar:/home/hadoop/pig-0.14.0/bin/../lib/guava-11.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/hive-common-0.14.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/hive-exec-0.14.0-core.jar:/home/hadoop/pig-0.14.0/bin/../lib/hive-serde-0.14.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/hive-shims-common-0.14.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/hive-shims-common-secure-0.14.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/jackson-core-asl-1.8.8.jar:/home/hadoop/pig-0.14.0/bin/../lib/jackson-mapper-asl-1.8.8.jar:/home/hadoop/pig-0.14.0/bin/../lib/jansi-1.9.jar:/home/hadoop/pig-0.14.0/bin/../lib/jline-1.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/joda-time-2.1.jar:/home/hadoop/pig-0.14.0/bin/../lib/jruby-complete-1.6.7.jar:/home/hadoop/pig-0.14.0/bin/../lib/js-1.7R2.jar:/home/hadoop/pig-0.14.0/bin/../lib/json-simple-1.1.jar:/home/hadoop/pig-0.14.0/bin/../lib/jython-standalone-2.5.3.jar:/home/hadoop/pig-0.14.0/bin/../lib/kryo-2.22.jar:/home/hadoop/pig-0.14.0/bin/../lib/piggybank.jar:/home/hadoop/pig-0.14.0/bin/../lib/protobuf-java-2.5.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/snappy-java-1.0.5.jar:/home/hadoop/pig-0.14.0/bin/../lib/ST4-4.0.4.jar:/home/hadoop/pig-0.14.0/bin/../lib/trevni-avro-1.7.5.jar:/home/hadoop/pig-0.14.0/bin/../lib/trevni-core-1.7.5.jar:/home/hadoop/pig-0.14.0/bin/../lib/zookeeper-3.4.5.jar:/home/hadoop/hbase-0.94.10/hbase-0.94.10.jar:/home/hadoop/hbase-0.94.10/hbase-0.94.10-tests.jar:/home/hadoop/hbase-0.94.10/lib/activation-1.1.jar:/home/hadoop/hbase-0.94.10/lib/asm-3.1.jar:/home/hadoop/hbase-0.94.10/lib/avro-1.5.3.jar:/home/hadoop/hbase-0.94.10/lib/avro-ipc-1.5.3.jar:/home/hadoop/hbase-0.94.10/lib/commons-beanutils-1.7.0.jar:/home/hadoop/hbase-0.94.10/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop/hbase-0.94.10/lib/commons-cli-1.2.jar:/home/hadoop/hbase-0.94.10/lib/commons-codec-1.4.jar:/home/hadoop/hbase-0.94.10/lib/commons-collections-3.2.1.jar:/home/hadoop/hbase-0.94.10/lib/commons-configuration-1.6.jar:/home/hadoop/hbase-0.94.10/lib/commons-digester-1.8.jar:/home/hadoop/hbase-0.94.10/lib/commons-el-1.0.jar:/home/hadoop/hbase-0.94.10/lib/commons-httpclient-3.1.jar:/home/hadoop/hbase-0.94.10/lib/commons-io-2.1.jar:/home/hadoop/hbase-0.94.10/lib/commons-lang-2.5.jar:/home/hadoop/hbase-0.94.10/lib/commons-logging-1.1.1.jar:/home/hadoop/hbase-0.94.10/lib/commons-math-2.1.jar:/home/hadoop/hbase-0.94.10/lib/commons-net-1.4.1.jar:/home/hadoop/hbase-0.94.10/lib/core-3.1.1.jar:/home/hadoop/hbase-0.94.10/lib/guava-11.0.2.jar:/home/hadoop/hbase-0.94.10/lib/hadoop-core-1.0.4.jar:/home/hadoop/hbase-0.94.10/lib/high-scale-lib-1.1.1.jar:/home/hadoop/hbase-0.94.10/lib/httpclient-4.1.2.jar:/home/hadoop/hbase-0.94.10/lib/httpcore-4.1.3.jar:/home/hadoop/hbase-0.94.10/lib/jackson-core-asl-1.8.8.jar:/home/hadoop/hbase-0.94.10/lib/jackson-jaxrs-1.8.8.jar:/home/hadoop/hbase-0.94.10/lib/jackson-mapper-asl-1.8.8.jar:/home/hadoop/hbase-0.94.10/lib/jackson-xc-1.8.8.jar:/home/hadoop/hbase-0.94.10/lib/jamon-runtime-2.3.1.jar:/home/hadoop/hbase-0.94.10/lib/jasper-compiler-5.5.23.jar:/home/hadoop/hbase-0.94.10/lib/jasper-runtime-5.5.23.jar:/home/hadoop/hbase-0.94.10/lib/jaxb-api-2.1.jar:/home/hadoop/hbase-0.94.10/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop/hbase-0.94.10/lib/jersey-core-1.8.jar:/home/hadoop/hbase-0.94.10/lib/jersey-json-1.8.jar:/home/hadoop/hbase-0.94.10/lib/jersey-server-1.8.jar:/home/hadoop/hbase-0.94.10/lib/jettison-1.1.jar:/home/hadoop/hbase-0.94.10/lib/jetty-6.1.26.jar:/home/hadoop/hbase-0.94.10/lib/jetty-util-6.1.26.jar:/home/hadoop/hbase-0.94.10/lib/jruby-complete-1.6.5.jar:/home/hadoop/hbase-0.94.10/lib/jsp-2.1-6.1.14.jar:/home/hadoop/hbase-0.94.10/lib/jsp-api-2.1-6.1.14.jar:/home/hadoop/hbase-0.94.10/lib/jsr305-1.3.9.jar:/home/hadoop/hbase-0.94.10/lib/junit-4.10-HBASE-1.jar:/home/hadoop/hbase-0.94.10/lib/libthrift-0.8.0.jar:/home/hadoop/hbase-0.94.10/lib/log4j-1.2.16.jar:/home/hadoop/hbase-0.94.10/lib/metrics-core-2.1.2.jar:/home/hadoop/hbase-0.94.10/lib/netty-3.2.4.Final.jar:/home/hadoop/hbase-0.94.10/lib/protobuf-java-2.4.0a.jar:/home/hadoop/hbase-0.94.10/lib/servlet-api-2.5-6.1.14.jar:/home/hadoop/hbase-0.94.10/lib/slf4j-api-1.4.3.jar:/home/hadoop/hbase-0.94.10/lib/slf4j-log4j12-1.4.3.jar:/home/hadoop/hbase-0.94.10/lib/snappy-java-1.0.3.2.jar:/home/hadoop/hbase-0.94.10/lib/stax-api-1.0.1.jar:/home/hadoop/hbase-0.94.10/lib/velocity-1.7.jar:/home/hadoop/hbase-0.94.10/lib/xmlenc-0.52.jar:/home/hadoop/hbase-0.94.10/lib/zookeeper-3.4.5.jar:/home/hadoop/pig-0.14.0/bin/../pig-0.14.0-core-h2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/avro-mapred-1.7.5-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/commons-collections4-4.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-client-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-common-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-hadoop2-compat-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-hadoop-compat-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-protocol-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hbase-server-0.96.0-hadoop2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/hive-shims-0.23-0.14.0.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-api-0.5.2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-common-0.5.2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-dag-0.5.2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-mapreduce-0.5.2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-runtime-internals-0.5.2.jar:/home/hadoop/pig-0.14.0/bin/../lib/h2/tez-runtime-library-0.5.2.jar:/home/hadoop/hbase-0.94.10/hbase-0.94.10.jar:/home/hadoop/zookeeper-3.4.5/zookeeper-3.4.5.jar:/usr/share/hadoop/lib/hadoop-fairscheduler-1.1.2.jar:/home/hadoop/hbase-0.94.10/lib/*
HADOOP_OPTS: -Djava.net.preferIPv4Stack=true -Xmx128m 
HADOOP_CLIENT_OPTS: -Xmx1000m  -Dpig.log.dir=/home/hadoop/pig-0.14.0/bin/../logs -Dpig.log.file=pig.log -Dpig.home.dir=/home/hadoop/pig-0.14.0/bin/.. -Xmx128m -Xmx128m 
/usr/bin/hadoop jar /home/hadoop/pig-0.14.0/bin/../pig-0.14.0-core-h2.jar

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题