hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ioan Eugen Stan <stan.ieu...@gmail.com>
Subject ClassNotFoundException: -libjars not working?
Date Wed, 22 Feb 2012 14:43:57 GMT
Hello,

I'm trying to run a map-reduce job and I get ClassNotFoundException, but 
I have the class submitted with -libjars. What's wrong with how I do 
things? Please help.

I'm running hadoop-0.20.2-cdh3u1, and I have everithing on the -libjars 
line. The job is submitted via a java app like:

  exec /usr/lib/jvm/java-6-sun/bin/java -Dproc_jar -Xmx200m -server 
-Dhadoop.log.dir=/opt/ui/var/log/mailsearch -Dhadoop.log.file=hadoop.log 
-Dhadoop.home.dir=/usr/lib/hadoop -Dhadoop.id.str=hbase 
-Dhadoop.root.logger=INFO,console -Dhadoop.policy.file=hadoop-policy.xml 
-classpath 
'/usr/lib/hadoop/conf:/usr/lib/jvm/java-6-sun/lib/tools.jar:/usr/lib/hadoop:/usr/lib/hadoop/hadoop-core-0.20.2-cdh3u1.jar:/usr/lib/hadoop/lib/ant-contrib-1.0b3.jar:/usr/lib/hadoop/lib/apache-log4j-extras-1.1.jar:/usr/lib/hadoop/lib/aspectjrt-1.6.5.jar:/usr/lib/hadoop/lib/aspectjtools-1.6.5.jar:/usr/lib/hadoop/lib/commons-cli-1.2.jar:/usr/lib/hadoop/lib/commons-codec-1.4.jar:/usr/lib/hadoop/lib/commons-daemon-1.0.1.jar:/usr/lib/hadoop/lib/commons-el-1.0.jar:/usr/lib/hadoop/lib/commons-httpclient-3.0.1.jar:/usr/lib/hadoop/lib/commons-logging-1.0.4.jar:/usr/lib/hadoop/lib/commons-logging-api-1.0.4.jar:/usr/lib/hadoop/lib/commons-net-1.4.1.jar:/usr/lib/hadoop/lib/core-3.1.1.jar:/usr/lib/hadoop/lib/hadoop-fairscheduler-0.20.2-cdh3u1.jar:/usr/lib/hadoop/lib/hsqldb-1.8.0.10.jar:/usr/lib/hadoop/lib/jackson-core-asl-1.5.2.jar:/usr/lib/hadoop/lib/jackson-mapper-asl-1.5.2.jar:/usr/lib/hadoop/lib/jasper-compiler-5.5.12.jar:/usr/lib/hadoop/lib/jasper-runtime-5.5.12.jar:/usr/lib/hadoop/lib
/jcl-over-slf4j-1.6.1.jar:/usr/lib/hadoop/lib/jets3t-0.6.1.jar:/usr/lib/hadoop/lib/jetty-6.1.26.jar:/usr/lib/hadoop/lib/jetty-servlet-tester-6.1.26.jar:/usr/lib/hadoop/lib/jetty-util-6.1.26.jar:/usr/lib/hadoop/lib/jsch-0.1.42.jar:/usr/lib/hadoop/lib/junit-4.5.jar:/usr/lib/hadoop/lib/kfs-0.2.2.jar:/usr/lib/hadoop/lib/log4j-1.2.15.jar:/usr/lib/hadoop/lib/mockito-all-1.8.2.jar:/usr/lib/hadoop/lib/oro-2.0.8.jar:/usr/lib/hadoop/lib/servlet-api-2.5-20081211.jar:/usr/lib/hadoop/lib/servlet-api-2.5-6.1.14.jar:/usr/lib/hadoop/lib/slf4j-api-1.6.1.jar:/usr/lib/hadoop/lib/slf4j-log4j12-1.6.1.jar:/usr/lib/hadoop/lib/xmlenc-0.52.jar:/usr/lib/hadoop/lib/jsp-2.1/jsp-2.1.jar:/usr/lib/hadoop/lib/jsp-2.1/jsp-api-2.1.jar:/usr/share/mailbox-convertor/lib/*:/usr/lib/hadoop/contrib/capacity-scheduler/hadoop-capacity-scheduler-0.20.2-cdh3u1.jar:/usr/lib/hbase/lib/hadoop-lzo-0.4.13.jar:/usr/lib/hbase/hbase.jar:/etc/hbase/conf:/usr/lib/hbase/lib:/usr/lib/zookeeper/zookeeper.jar:/usr/lib/hadoop/contrib
/capacity-scheduler/hadoop-capacity-scheduler-0.20.2-cdh3u1.jar:/usr/lib/hbase/lib/hadoop-lzo-0.4.13.jar:/usr/lib/hbase/hbase.jar:/etc/hbase/conf:/usr/lib/hbase/lib:/usr/lib/zookeeper/zookeeper.jar'

org.apache.hadoop.util.RunJar 
/usr/share/mailbox-convertor/mailbox-convertor-0.1-SNAPSHOT.jar 
-libjars=/usr/share/mailbox-convertor/lib/antlr-2.7.7.jar,/usr/share/mailbox-convertor/lib/aopalliance-1.0.jar,/usr/share/mailbox-convertor/lib/asm-3.1.jar,/usr/share/mailbox-convertor/lib/backport-util-concurrent-3.1.jar,/usr/share/mailbox-convertor/lib/cglib-2.2.jar,/usr/share/mailbox-convertor/lib/hadoop-ant-3.0-u1.pom,/usr/share/mailbox-convertor/lib/speed4j-0.9.jar,/usr/share/mailbox-convertor/lib/jamm-0.2.2.jar,/usr/share/mailbox-convertor/lib/uuid-3.2.0.jar,/usr/share/mailbox-convertor/lib/high-scale-lib-1.1.1.jar,/usr/share/mailbox-convertor/lib/jsr305-1.3.9.jar,/usr/share/mailbox-convertor/lib/guava-11.0.1.jar,/usr/share/mailbox-convertor/lib/protobuf-java-2.4.0a.jar,/usr/share/mailbox-convertor/lib/concurrentlinkedhashmap-lru-1.1.jar,/usr/share/mailbox-convertor/lib/json-simple-1.1.jar,/usr/share/mailbox-convertor/lib/itext-2.1.5.jar,/usr/share/mailbox-convertor/lib/jmxtools-1.2.1.jar,/usr/share/mailbox-convertor/lib/jersey-client-1.4.jar,/usr/share/mailbox-converto
r/lib/jersey-core-1.4.jar,/usr/share/mailbox-convertor/lib/jersey-json-1.4.jar,/usr/share/mailbox-convertor/lib/jersey-server-1.4.jar,/usr/share/mailbox-convertor/lib/jmxri-1.2.1.jar,/usr/share/mailbox-convertor/lib/jaxb-impl-2.1.12.jar,/usr/share/mailbox-convertor/lib/xstream-1.2.2.jar,/usr/share/mailbox-convertor/lib/commons-metrics-1.3.jar,/usr/share/mailbox-convertor/lib/commons-monitoring-2.9.1.jar,/usr/share/mailbox-convertor/lib/html-utils-2.3.jar,/usr/share/mailbox-convertor/lib/mailstore-client-1.0.3.jar,/usr/share/mailbox-convertor/lib/newsearch-commons-1.0.28eo-SNAPSHOT.jar,/usr/share/mailbox-convertor/lib/spring-hbase-gateway-1.0.15.jar,/usr/share/mailbox-convertor/lib/newsearch-deleter-filtering-1.0.11.jar,/usr/share/mailbox-convertor/lib/newsearch-indexing-1.0.28eo-SNAPSHOT.jar,/usr/share/mailbox-convertor/lib/ums-commons-2.1.4.jar,/usr/share/mailbox-convertor/lib/trinity-config-1.2.0.jar,/usr/share/mailbox-convertor/lib/trinity-message-6.7.0.jar,/usr/share/mail
box-convertor/lib/commons-beanutils-1.8.3.jar,/usr/share/mailbox-convertor/lib/commons-beanutils-core-1.8.0.jar,/usr/share/mailbox-convertor/lib/commons-cli-1.2.jar,/usr/share/mailbox-convertor/lib/commons-codec-1.6.jar,/usr/share/mailbox-convertor/lib/commons-collections-3.2.1.jar,/usr/share/mailbox-convertor/lib/commons-configuration-1.6.jar,/usr/share/mailbox-convertor/lib/commons-dbcp-1.4.jar,/usr/share/mailbox-convertor/lib/commons-digester-1.8.jar,/usr/share/mailbox-convertor/lib/commons-el-1.0.jar,/usr/share/mailbox-convertor/lib/commons-fileupload-1.2.2.jar,/usr/share/mailbox-convertor/lib/commons-httpclient-3.1-ui-patch-2.0.jar,/usr/share/mailbox-convertor/lib/commons-io-2.1.jar,/usr/share/mailbox-convertor/lib/commons-jxpath-1.3.jar,/usr/share/mailbox-convertor/lib/commons-lang-2.6.jar,/usr/share/mailbox-convertor/lib/commons-net-3.1-UI.jar,/usr/share/mailbox-convertor/lib/commons-pool-1.5.7.jar,/usr/share/mailbox-convertor/lib/hsqldb-1.8.0.7.jar,/usr/share/mailbox-
convertor/lib/activation-1.1.1.jar,/usr/share/mailbox-convertor/lib/jcr-2.0.jar,/usr/share/mailbox-convertor/lib/jms-1.1.jar,/usr/share/mailbox-convertor/lib/mail-1.4.4.jar,/usr/share/mailbox-convertor/lib/servlet-api-2.4.jar,/usr/share/mailbox-convertor/lib/jsp-api-2.1.jar,/usr/share/mailbox-convertor/lib/jaxb-api-2.1.jar,/usr/share/mailbox-convertor/lib/jdom-1.0.jar,/usr/share/mailbox-convertor/lib/jcommon-1.0.12.jar,/usr/share/mailbox-convertor/lib/jline-0.9.94.jar,/usr/share/mailbox-convertor/lib/apache-log4j-extras-1.1.jar,/usr/share/mailbox-convertor/lib/log4j-1.2.15.jar,/usr/share/mailbox-convertor/lib/hector-core-0.8.0-2.jar,/usr/share/mailbox-convertor/lib/jets3t-0.6.1.jar,/usr/share/mailbox-convertor/lib/ehcache-1.4.1.jar,/usr/share/mailbox-convertor/lib/jsr107cache-1.0.jar,/usr/share/mailbox-convertor/lib/htmlparser-1.3.1-unitedinternet-1.jar,/usr/share/mailbox-convertor/lib/antlr-3.2.jar,/usr/share/mailbox-convertor/lib/antlr-runtime-3.2.jar,/usr/share/mailbox-con
vertor/lib/stringtemplate-3.2.jar,/usr/share/mailbox-convertor/lib/avro-1.5.3.jar,/usr/share/mailbox-convertor/lib/avro-ipc-1.5.3.jar,/usr/share/mailbox-convertor/lib/cassandra-all-0.8.1.jar,/usr/share/mailbox-convertor/lib/cassandra-thrift-0.8.1.jar,/usr/share/mailbox-convertor/lib/avro-1.4.0-cassandra-1.jar,/usr/share/mailbox-convertor/lib/commons-math-2.2.jar,/usr/share/mailbox-convertor/lib/geronimo-stax-api_1.0_spec-1.0.1.jar,/usr/share/mailbox-convertor/lib/hadoop-core-0.20.2-cdh3u1.jar,/usr/share/mailbox-convertor/lib/hbase-0.92.0-1and1.jar,/usr/share/mailbox-convertor/lib/httpclient-4.1.2.jar,/usr/share/mailbox-convertor/lib/httpcore-4.1.2.jar,/usr/share/mailbox-convertor/lib/jackrabbit-jcr-rmi-2.2.8.jar,/usr/share/mailbox-convertor/lib/apache-mime4j-0.6.jar,/usr/share/mailbox-convertor/lib/lucene-analyzers-3.4.0.jar,/usr/share/mailbox-convertor/lib/lucene-core-2.9.1.jar,/usr/share/mailbox-convertor/lib/lucene-highlighter-2.9.1.jar,/usr/share/mailbox-convertor/lib/luc
ene-memory-2.9.1.jar,/usr/share/mailbox-convertor/lib/lucene-misc-2.9.1.jar,/usr/share/mailbox-convertor/lib/lucene-queries-2.9.1.jar,/usr/share/mailbox-convertor/lib/lucene-snowball-2.9.1.jar,/usr/share/mailbox-convertor/lib/lucene-spellchecker-2.9.1.jar,/usr/share/mailbox-convertor/lib/mahout-collections-1.0.jar,/usr/share/mailbox-convertor/lib/mahout-core-0.6.jar,/usr/share/mailbox-convertor/lib/mahout-integration-0.6.jar,/usr/share/mailbox-convertor/lib/mahout-math-0.6.jar,/usr/share/mailbox-convertor/lib/commons-cli-2.0-mahout.jar,/usr/share/mailbox-convertor/lib/solr-commons-csv-3.4.0.jar,/usr/share/mailbox-convertor/lib/solr-core-1.4.0.jar,/usr/share/mailbox-convertor/lib/solr-solrj-1.4.0.jar,/usr/share/mailbox-convertor/lib/libthrift-0.7.0.jar,/usr/share/mailbox-convertor/lib/velocity-1.7.jar,/usr/share/mailbox-convertor/lib/batik-css-1.7.jar,/usr/share/mailbox-convertor/lib/batik-ext-1.7.jar,/usr/share/mailbox-convertor/lib/batik-util-1.7.jar,/usr/share/mailbox-conve
rtor/lib/zookeeper-3.4.2.jar,/usr/share/mailbox-convertor/lib/jackson-core-asl-1.8.5.jar,/usr/share/mailbox-convertor/lib/jackson-jaxrs-1.5.5.jar,/usr/share/mailbox-convertor/lib/jackson-mapper-asl-1.8.5.jar,/usr/share/mailbox-convertor/lib/jackson-xc-1.8.5.jar,/usr/share/mailbox-convertor/lib/jettison-1.1.jar,/usr/share/mailbox-convertor/lib/wstx-asl-3.2.7.jar,/usr/share/mailbox-convertor/lib/core-3.1.1.jar,/usr/share/mailbox-convertor/lib/freemarker-2.3.15.jar,/usr/share/mailbox-convertor/lib/libidn-1.15.jar,/usr/share/mailbox-convertor/lib/jamon-runtime-2.3.1.jar,/usr/share/mailbox-convertor/lib/netty-3.2.4.Final.jar,/usr/share/mailbox-convertor/lib/jcrom-1.3.2.jar,/usr/share/mailbox-convertor/lib/jruby-complete-1.6.5.jar,/usr/share/mailbox-convertor/lib/jyaml-1.3.jar,/usr/share/mailbox-convertor/lib/mstor-0.9.13.jar,/usr/share/mailbox-convertor/lib/bson-2.5.jar,/usr/share/mailbox-convertor/lib/mongo-java-driver-2.5.jar,/usr/share/mailbox-convertor/lib/jetty-6.1.26.jar,/us
r/share/mailbox-convertor/lib/jetty-util-6.1.26.jar,/usr/share/mailbox-convertor/lib/jsp-2.1-6.1.14.jar,/usr/share/mailbox-convertor/lib/jsp-api-2.1-6.1.14.jar,/usr/share/mailbox-convertor/lib/servlet-api-2.5-6.1.14.jar,/usr/share/mailbox-convertor/lib/antisamy-1.4.4.jar,/usr/share/mailbox-convertor/lib/antisamy-sample-configs-1.4.4.jar,/usr/share/mailbox-convertor/lib/jcl-over-slf4j-1.6.1.jar,/usr/share/mailbox-convertor/lib/jul-to-slf4j-1.6.1.jar,/usr/share/mailbox-convertor/lib/slf4j-api-1.6.1.jar,/usr/share/mailbox-convertor/lib/slf4j-log4j12-1.6.1.jar,/usr/share/mailbox-convertor/lib/spring-aop-3.0.5.RELEASE.jar,/usr/share/mailbox-convertor/lib/spring-asm-3.1.0.RELEASE.jar,/usr/share/mailbox-convertor/lib/spring-beans-3.0.5.RELEASE.jar,/usr/share/mailbox-convertor/lib/spring-context-3.0.5.RELEASE.jar,/usr/share/mailbox-convertor/lib/spring-core-3.0.5.RELEASE.jar,/usr/share/mailbox-convertor/lib/spring-expression-3.1.0.RELEASE.jar,/usr/share/mailbox-convertor/lib/uncommon
s-maths-1.2.2.jar,/usr/share/mailbox-convertor/lib/watchmaker-framework-0.6.2.jar,/usr/share/mailbox-convertor/lib/snappy-java-1.0.3.2.jar,/usr/share/mailbox-convertor/lib/snakeyaml-1.6.jar,/usr/share/mailbox-convertor/lib/oro-2.0.8.jar,/usr/share/mailbox-convertor/lib/stax-api-1.0.1.jar,/usr/share/mailbox-convertor/lib/jasper-compiler-5.5.23.jar,/usr/share/mailbox-convertor/lib/jasper-runtime-5.5.23.jar,/usr/share/mailbox-convertor/lib/wstx-asl-3.2.7.jar,/usr/share/mailbox-convertor/lib/xml-apis-1.3.04.jar,/usr/share/mailbox-convertor/lib/xml-apis-ext-1.3.04.jar,/usr/share/mailbox-convertor/lib/xmlenc-0.52.jar,/usr/share/mailbox-convertor/lib/xpp3_min-1.1.3.4.O.jar

-t lucehbase-emails -m 13294028075653



The tmpjars from the generated jobconf looks like this (taken from web 
interface):

tmpjars 
file:/usr/share/mailbox-convertor/lib/zookeeper-3.4.2.jar,file:/usr/lib/hadoop-0.20/hadoop-core-0.20.2-cdh3u1.jar,file:/usr/share/mailbox-convertor/lib/hbase-0.92.0-1and1.jar

and mapred.job.classpath.files is:

/var/tmp/mapred/staging/hbase/.staging/job_201201271031_0027/libjars/zookeeper-3.4.2.jar:/var/tmp/mapred/staging/hbase/.staging/job_201201271031_0027/libjars/hadoop-core-0.20.2-cdh3u1.jar:/var/tmp/mapred/staging/hbase/.staging/job_201201271031_0027/libjars/hbase-0.92.0-1and1.jar

and I get:

Error: java.lang.ClassNotFoundException: org.apache.commons.lang.ArrayUtils
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
         at 
com.unitedinternet.portal.emailorganizer.TableToDictionaryMapper.map(TableToDictionaryMapper.java:31)
         at 
com.unitedinternet.portal.emailorganizer.TableToDictionaryMapper.map(TableToDictionaryMapper.java:23)
         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:647)
         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
         at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
         at org.apache.hadoop.mapred.Child.main(Child.java:264)

Regards,

-- 
Ioan Eugen Stan
http://ieugen.blogspot.com

Mime
View raw message