Hi Odin, org/htrace/Trace is a class from the pre-Apache version of HTrace. It sounds like the HTrace jar you need is not 3.1.0-incubating, but perhaps 3.0.4 (or even some older version)?
Try finding the source code for the version of Hadoop you are using and running "mvn dependency:tree" best, Colin On Thu, Oct 8, 2015 at 10:32 AM, Odin Guillermo Caudillo Gallegos <[email protected]> wrote: > Hi, i'm building a code to write files on hdfs, but it gives me the > following error: > > 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:23) > 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 > > I already have the htrace-core-3.1.0-incubating.jar in my external jars, > but it appears that isnt't looking for the apache one but a different > version. > I had included all the jars in the hadoop library folder but no success. > Thanks
