配置Oozie-java NoClassDefFoundError

时间:2014-01-06 18:02:38

标签: hadoop oozie

我一直试图在我的机器上运行Oozie服务器,但我无法这样做。以下是我到目前为止所做的各种命令和配置的输出。请解释我错过的内容。

INDhruvk:oozie-3.3.2-cdh4.5.0 Dhruv$ bin/oozie-start.sh
WARN: Use of this script is deprecated; use 'oozied.sh start' instead

Setting OOZIE_HOME:          /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0
Setting OOZIE_CONFIG:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf
Sourcing:                    /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf/oozie-env.sh
/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf/oozie-env.sh: line 1: pw#!/bin/bash: No such file or directory
  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
Setting OOZIE_CONFIG_FILE:   oozie-site.xml
Setting OOZIE_DATA:          /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/data
Setting OOZIE_LOG:           /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs
Setting OOZIE_LOG4J_FILE:    oozie-log4j.properties
Setting OOZIE_LOG4J_RELOAD:  10
Setting OOZIE_HTTP_HOSTNAME: INDhruvk.local
Setting OOZIE_HTTP_PORT:     11000
Setting OOZIE_ADMIN_PORT:     11001
Setting OOZIE_HTTPS_PORT:     11443
Setting OOZIE_BASE_URL:      http://INDhruvk.local:11000/oozie
Setting CATALINA_BASE:       /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Setting OOZIE_HTTPS_KEYSTORE_FILE:     /Users/Dhruv/.keystore
Setting OOZIE_HTTPS_KEYSTORE_PASS:     password
Setting CATALINA_OUT:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs/catalina.out
Setting CATALINA_PID:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp/oozie.pid

Using   CATALINA_OPTS:        -Xmx1024m -Dderby.stream.error.file=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs/derby.log
Adding to CATALINA_OPTS:     -Doozie.home.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0 -Doozie.config.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf -Doozie.log.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs -Doozie.data.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/data -Doozie.config.file=oozie-site.xml -Doozie.log4j.file=oozie-log4j.properties -Doozie.log4j.reload=10 -Doozie.http.hostname=INDhruvk.local -Doozie.admin.port=11001 -Doozie.http.port=11000 -Doozie.https.port=11443 -Doozie.base.url=http://INDhruvk.local:11000/oozie -Doozie.https.keystore.file=/Users/Dhruv/.keystore -Doozie.https.keystore.pass=password -Djava.library.path=

Using CATALINA_BASE:   /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Using CATALINA_HOME:   /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Using CATALINA_TMPDIR: /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
Using CLASSPATH:       /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/bin/bootstrap.jar
Using CATALINA_PID:    /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp/oozie.pid
Existing PID file found during start.
Removing/clearing stale PID file.

另一个oozie-run.sh的调用:

INDhruvk:oozie-3.3.2-cdh4.5.0 Dhruv$ bin/oozie-run.sh
WARN: Use of this script is deprecated; use 'oozied.sh run' instead

Setting OOZIE_HOME:          /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0
Setting OOZIE_CONFIG:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf
Sourcing:                    /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf/oozie-env.sh
/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf/oozie-env.sh: line 1: pw#!/bin/bash: No such file or directory
  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
Setting OOZIE_CONFIG_FILE:   oozie-site.xml
Setting OOZIE_DATA:          /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/data
Setting OOZIE_LOG:           /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs
Setting OOZIE_LOG4J_FILE:    oozie-log4j.properties
Setting OOZIE_LOG4J_RELOAD:  10
Setting OOZIE_HTTP_HOSTNAME: INDhruvk.local
Setting OOZIE_HTTP_PORT:     11000
Setting OOZIE_ADMIN_PORT:     11001
Setting OOZIE_HTTPS_PORT:     11443
Setting OOZIE_BASE_URL:      http://INDhruvk.local:11000/oozie
Setting CATALINA_BASE:       /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Setting OOZIE_HTTPS_KEYSTORE_FILE:     /Users/Dhruv/.keystore
Setting OOZIE_HTTPS_KEYSTORE_PASS:     password
Setting CATALINA_OUT:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs/catalina.out
Setting CATALINA_PID:        /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp/oozie.pid

Using   CATALINA_OPTS:        -Xmx1024m -Dderby.stream.error.file=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs/derby.log
Adding to CATALINA_OPTS:     -Doozie.home.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0 -Doozie.config.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/conf -Doozie.log.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/logs -Doozie.data.dir=/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/data -Doozie.config.file=oozie-site.xml -Doozie.log4j.file=oozie-log4j.properties -Doozie.log4j.reload=10 -Doozie.http.hostname=INDhruvk.local -Doozie.admin.port=11001 -Doozie.http.port=11000 -Doozie.https.port=11443 -Doozie.base.url=http://INDhruvk.local:11000/oozie -Doozie.https.keystore.file=/Users/Dhruv/.keystore -Doozie.https.keystore.pass=password -Djava.library.path=

Using CATALINA_BASE:   /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Using CATALINA_HOME:   /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server
Using CATALINA_TMPDIR: /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
Using CLASSPATH:       /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/bin/bootstrap.jar
Using CATALINA_PID:    /usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/oozie-server/temp/oozie.pid
Jan 06, 2014 11:24:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
Jan 06, 2014 11:24:43 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-11000
Jan 06, 2014 11:24:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 439 ms
Jan 06, 2014 11:24:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 06, 2014 11:24:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Jan 06, 2014 11:24:43 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor oozie.xml

ERROR: Oozie could not be started

REASON: java.lang.NoClassDefFoundError: org/apache/hadoop/util/ReflectionUtils

Stacktrace:
-----------------------------------------------------------------
java.lang.NoClassDefFoundError: org/apache/hadoop/util/ReflectionUtils
    at org.apache.oozie.service.Services.setServiceInternal(Services.java:359)
    at org.apache.oozie.service.Services.<init>(Services.java:108)
    at org.apache.oozie.servlet.ServicesLoader.contextInitialized(ServicesLoader.java:38)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.ReflectionUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    ... 27 more

我的lib文件夹有以下jar:

commons-cli-1.2.jar         
hadoop-auth-2.0.0-cdh4.5.0.jar      
json-simple-1.1.jar         
slf4j-api-1.6.1.jar         
xercesImpl-2.10.0.jar
commons-codec-1.4.jar           
hadoop-core-2.0.0-mr1-cdh4.5.0.jar  
oozie-client-3.3.2-cdh4.5.0.jar     
slf4j-simple-1.6.1.jar          
xml-apis-1.4.01.jar

我还在libext文件夹中添加了相同的2个罐子:

hadoop-auth-2.0.0-cdh4.5.0.jar      
hadoop-core-2.0.0-mr1-cdh4.5.0.jar

这些是src/hadooplibs/

的内容
hadoop-cdh4mr1/        
hadoop-distcp-cdh4mr1/ 
hadoop-test-cdh4mr1/  
pom.xml 
hadoop-cdh4mr2/        
hadoop-distcp-cdh4mr2/
hadoop-test-cdh4mr2/

这些是/usr/local/hadoop/oozie/oozie-3.3.2-cdh4.5.0/libext

的内容
JavaEWAH-0.3.2.jar
ST4-4.0.4.jar
activation-1.1.jar
antlr-2.7.7.jar
antlr-3.4.jar
antlr-runtime-3.4.jar
apache-log4j-extras-1.1.jar
asm-3.2.jar
avro-1.7.4.jar
avro-ipc-1.7.4-tests.jar
avro-ipc-1.7.4.jar
avro-mapred-1.7.4-hadoop2.jar
cloudera-jets3t-2.0.0-cdh4.5.0.jar
collections-generic-4.01.jar
commons-beanutils-1.7.0.jar
commons-beanutils-core-1.8.0.jar
commons-cli-1.2.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-compress-1.4.1.jar
commons-configuration-1.6.jar
commons-dbcp-1.4.jar
commons-digester-1.8.jar
commons-el-1.0.jar
commons-io-2.1.jar
commons-lang-2.4.jar
commons-logging-1.1.jar
commons-math-2.1.jar
commons-net-3.1.jar
commons-pool-1.5.4.jar
datanucleus-api-jdo-3.2.1.jar
datanucleus-connectionpool-2.0.3.jar
datanucleus-core-3.2.2.jar
datanucleus-enhancer-2.0.3.jar
datanucleus-rdbms-3.2.1.jar
derby-10.6.1.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-jpa_2.0_spec-1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
guava-11.0.2.jar
hadoop-annotations-2.0.0-cdh4.5.0.jar
hadoop-auth-2.0.0-cdh4.5.0.jar
hadoop-client-2.0.0-cdh4.5.0.jar
hadoop-client-2.0.0-mr1-cdh4.5.0.jar
hadoop-common-2.0.0-cdh4.5.0.jar
hadoop-core-2.0.0-mr1-cdh4.5.0.jar
hadoop-hdfs-2.0.0-cdh4.5.0.jar
hadoop-mapreduce-client-app-2.0.0-cdh4.5.0.jar
hadoop-mapreduce-client-common-2.0.0-cdh4.5.0.jar
hadoop-mapreduce-client-core-2.0.0-cdh4.5.0.jar
hadoop-mapreduce-client-jobclient-2.0.0-cdh4.5.0.jar
hadoop-mapreduce-client-shuffle-2.0.0-cdh4.5.0.jar
hadoop-yarn-api-2.0.0-cdh4.5.0.jar
hadoop-yarn-client-2.0.0-cdh4.5.0.jar
hadoop-yarn-common-2.0.0-cdh4.5.0.jar
hadoop-yarn-server-common-2.0.0-cdh4.5.0.jar
haivvreo-1.0.7-cdh-4.jar
hamcrest-core-1.1.jar
hive-builtins-0.10.0-cdh4.5.0.jar
hive-cli-0.10.0-cdh4.5.0.jar
hive-common-0.10.0-cdh4.5.0.jar
hive-contrib-0.10.0-cdh4.5.0.jar
hive-exec-0.10.0-cdh4.5.0.jar
hive-jdbc-0.10.0-cdh4.5.0.jar
hive-metastore-0.10.0-cdh4.5.0.jar
hive-serde-0.10.0-cdh4.5.0.jar
hive-service-0.10.0-cdh4.5.0.jar
hive-shims-0.10.0-cdh4.5.0.jar
hsqldb-1.8.0.7.jar
httpclient-4.2.5.jar
httpcore-4.2.5.jar
jackson-core-asl-1.8.8.jar
jackson-jaxrs-1.8.8.jar
jackson-mapper-asl-1.8.8.jar
jackson-xc-1.8.8.jar
jaxb-api-2.2.2.jar
jaxb-impl-2.2.3-1.jar
jdo2-api-2.3-ec.jar
jdom-1.1.jar
jersey-core-1.8.jar
jersey-json-1.8.jar
jersey-server-1.8.jar
jettison-1.1.jar
jetty-util-6.1.26.cloudera.2.jar
jline-0.9.94.jar
jsch-0.1.42.jar
json-20090211.jar
json-simple-1.1.jar
jsr305-1.3.9.jar
jta-1.1.jar
jung-algorithms-2.0.1.jar
jung-api-2.0.1.jar
jung-graph-impl-2.0.1.jar
jung-visualization-2.0.1.jar
junit-4.10.jar
libfb303-0.9.0.jar
libthrift-0.9.0.jar
log4j-1.2.16.jar
mockito-all-1.8.5.jar
netty-3.2.4.Final.jar
netty-3.4.0.Final.jar
oozie-client-3.3.2-cdh4.5.0.jar
oozie-core-3.3.2-cdh4.5.0.jar
oozie-hadoop-2.0.0-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-hadoop-2.0.0-mr1-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-hadoop-distcp-2.0.0-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-hadoop-distcp-2.0.0-mr1-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-hadoop-test-2.0.0-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-hadoop-test-2.0.0-mr1-cdh4.5.0.oozie-3.3.2-cdh4.5.0.jar
oozie-tools-3.3.2-cdh4.5.0.jar
openjpa-jdbc-2.2.2.jar
openjpa-kernel-2.2.2.jar
openjpa-lib-2.2.2.jar
openjpa-persistence-2.2.2.jar
openjpa-persistence-jdbc-2.2.2.jar
paranamer-2.3.jar
postgresql-9.0-801.jdbc4.jar
protobuf-java-2.4.0a.jar
serp-1.14.1.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
slf4j-simple-1.6.1.jar
snappy-java-1.0.4.1.jar
sqlline-1_0_2.jar
stax-api-1.0.1.jar
stringtemplate-3.2.1.jar
xercesImpl-2.10.0.jar
xml-apis-1.4.01.jar
xmlenc-0.52.jar
xz-1.0.jar
zookeeper-3.4.5-cdh4.5.0.jar

非常感谢。

1 个答案:

答案 0 :(得分:1)

您可能遗漏了libext/中的某些库,请尝试以下操作:

cp ${OOZIE_BUILD_DIR}/hadooplibs/hadoop-2/target/hadooplibs/hadooplib-2.0.2-alpha.oozie-3.3.2/* libext/ 

您可能需要更改版本号。

我写了blog post about installing Oozie,您可以用它来重新检查您的步骤。