hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mingliang Liu <m...@hortonworks.com>
Subject Re: Hadoop Java exception
Date Thu, 08 Oct 2015 17:35:54 GMT
If you use Maven or Gradle, you can set up your config files there. It’s easier to maintain
the dependency.

Mingliang Liu
Member of Technical Staff - HDFS, Hortonworks Inc.
mliu@hortonworks.com<mailto:mliu@hortonworks.com>



On Oct 8, 2015, at 10:04 AM, Odin Guillermo Caudillo Gallegos <odin.guillermo@gmail.com<mailto:odin.guillermo@gmail.com>>
wrote:

Hi.
I already have it on the external jars over Eclipse.
But still got the error.
Is there any alternatives to this?
Thanks

2015-10-08 11:59 GMT-05:00 Ted Yu <yuzhihong@gmail.com<mailto:yuzhihong@gmail.com>>:
Looks like htrace jar was missing from the classpath.

jar  tvf htrace-core-3.1.0-incubating.jar | grep Trace
  1187 Thu Jan 15 11:36:52 UTC 2015 org/apache/htrace/HTraceConfiguration$MapConf.class
  3195 Thu Jan 15 11:36:52 UTC 2015 org/apache/htrace/HTraceConfiguration.class
  5247 Thu Jan 15 11:36:52 UTC 2015 org/apache/htrace/Trace.class

FYI

On Thu, Oct 8, 2015 at 9:09 AM, Odin Guillermo Caudillo Gallegos <odin.guillermo@gmail.com<mailto:odin.guillermo@gmail.com>>
wrote:
Hi.
I'm doing a code to write a file on HDFS, i tried a few ways to do it, but i always get the
following error:
Do i need another library? i include all the libraries in the share/hadoop/common/lib folder
and still getting it

Exception in thread "main" java.lang.NoClassDefFoundError: org/htrace/Trace
at org.apache.hadoop.hdfs.DFSOutputStream.<init>(DFSOutputStream.java:1703)
at org.apache.hadoop.hdfs.DFSOutputStream.newStreamForCreate(DFSOutputStream.java:1756)
at org.apache.hadoop.hdfs.DFSClient.create(DFSClient.java:1668)
at org.apache.hadoop.hdfs.DFSClient.create(DFSClient.java:1593)
at org.apache.hadoop.hdfs.DistributedFileSystem$6.doCall(DistributedFileSystem.java:397)
at org.apache.hadoop.hdfs.DistributedFileSystem$6.doCall(DistributedFileSystem.java:393)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.create(DistributedFileSystem.java:393)
at org.apache.hadoop.hdfs.DistributedFileSystem.create(DistributedFileSystem.java:337)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:909)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:802)
at test.HDFSMain.main(HDFSMain.java:25)
Caused by: java.lang.ClassNotFoundException: org.htrace.Trace
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:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 12 more

Thanks



Mime
View raw message