Yes, I included all the necessary jar files I think. I guess my problem is probably related to my eclipse setup.
I can create a MiniDFSCluster object by running my application in command line (e.g., bin/hadoop myApplicationClass) , and a MiniDFSCluster object is created inside the main function of myApplicationClass. But I can NOT run this program within eclipse, probably I did not do it in the right way. I got the similar error message saying java.lang.NoSuchMethodError: org.apache.hadoop.security. > > > UserGroupInformation.setCurrentUser(Lorg/apache/hadoop/security/UserGroupInformation;)V > at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:236) > at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:119) > Could you guys please give me more hint? Thanks Guohua On Tue, Dec 15, 2009 at 11:59 AM, Stack <saint....@gmail.com> wrote: > Do you have hadoop jars in your eclipse classpath? > Stack > > > > > On Dec 14, 2009, at 10:58 PM, Guohua Hao <haoguo...@gmail.com> wrote: > > Hello All, >> >> In my own application, I have a unit test case which extends >> HBaseClusterTestCase in order to test some of my operation over HBase >> cluster. I override the setup function in my own test case, and this setup >> function begins with super.setup() function call. >> >> When I try to run my unit test from within Eclipse, I got the following >> error: >> >> java.lang.NoSuchMethodError: >> >> org.apache.hadoop.security.UserGroupInformation.setCurrentUser(Lorg/apache/hadoop/security/UserGroupInformation;)V >> at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:236) >> at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:119) >> at >> >> org.apache.hadoop.hbase.HBaseClusterTestCase.setUp(HBaseClusterTestCase.java:123) >> >> I included the hadoop-0.20.1-core.jar in my classpath, since this jar file >> contains the org.apache.hadoop.security.UserGroupInformation class. >> >> Could anybody give me some hint on how to solve this problem? >> >> Thank you very much, >> Guohua >> >