hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: Classpath problem when running Java scanner
Date Wed, 18 Aug 2010 15:05:00 GMT
See http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath

J-D

On Wed, Aug 18, 2010 at 7:50 AM, Wojciech Langiewicz
<wlangiewicz@gmail.com> wrote:
> No, I can't. But I have successfully run this code inside eclipse, and I
> don't know what is wrong. This is my classpath for this case:
>
> /usr/lib/hbase/*:/usr/lib/hadoop/*:.
>
> all jars are there since installation, what should I do?
>
> W dniu 18.08.2010 16:05, Jean-Daniel Cryans pisze:
>>
>> If it really is, can you access other HBase classes like HTable or
>> HBaseAdmin?
>>
>> J-D
>>
>> On Wed, Aug 18, 2010 at 6:56 AM, Wojciech Langiewicz
>> <wlangiewicz@gmail.com>  wrote:
>>>
>>> Of course this looks like HBase jar is not on the classpath, but it is -
>>> my
>>> source file compiles with the same classpath settings.
>>>
>>> W dniu 18.08.2010 15:50, Jean-Daniel Cryans pisze:
>>>>
>>>> It looks like the hbase jar isn't on your classpath, else it would
>>>> find HBaseConfiguration.
>>>>
>>>> J-D
>>>>
>>>> On Wed, Aug 18, 2010 at 3:08 AM, Wojciech Langiewicz
>>>> <wlangiewicz@gmail.com>    wrote:
>>>>>
>>>>> 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
>>>>>
>>>>
>>>
>>>
>>
>
>

Mime
View raw message