Hello,
I tried to write custom HBase scanner in Java. It compiles successfully, but I have problem with running it. I always get exception: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration
        at AdserverLogsScanner.<init>(AdserverLogsScanner.java:28)
        at AdserverLogsScanner.main(AdserverLogsScanner.java:70)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration
        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:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 2 more
this is the line that is causing it:
28: config = HBaseConfiguration.create();
I'm using new API for that.

I have HBase working (I've used shell and web interface on this setup) and I have added correct classpath to this class (jar): System.setProperty("java.class.path", "/usr/lib/hbase/*:/usr/lib/hadoop/*:.");
(with this classpath it compiles)

Please help me, because I can't possibly see that is wrong here.
Thank you in advance for any answers and comments.
--
Wojciech Langiewicz

Reply via email to