accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Hughes <jn...@virginia.edu>
Subject Re: java.lang.NoClassDefFoundError with fields of custom Filter
Date Thu, 07 Jul 2016 15:24:09 GMT
Hi Massimilian,

As a quick note, your error says that it could not initialize class
accumulo.lexicoders.MyLexicoder.  Did you provide all the dependencies for
your class on Accumulo's classpath?

That exception (or similar) can occur if there is a static block in your
MyLexicoder class which can't run properly.

Cheers,

Jim


On Thu, Jul 7, 2016 at 11:19 AM, Massimilian Mattetti <MASSIMIL@il.ibm.com>
wrote:

> Hi,
>
> I have implemented a custom filter and a custom lexicoder. Both this two
> classes are packed in the same jar that has been deployed under the
> directory $ACCUMULO_HOME/*lib*/*ext*of my Accumulo servers (version
> 1.7.1). The lexicoder is used by the filter to get the real object from the
> accumulo value and test some conditions on it. When I tried to scan the
> table applying this filter I got the following exception:
>
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> accumulo.lexicoders.MyLexicoder
>         at accumulo.filters.MyFilter.<init>(MyFilter.java:24)
>         at sun.reflect.GeneratedConstructorAccessor9.newInstance(Unknown
> Source)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>         at java.lang.Class.newInstance(Class.java:442)
>         at
> org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:261)
>         at
> org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:237)
>         at
> org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:218)
>         at
> org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:205)
>         at
> org.apache.accumulo.tserver.tablet.ScanDataSource.createIterator(ScanDataSource.java:193)
>         at
> org.apache.accumulo.tserver.tablet.ScanDataSource.iterator(ScanDataSource.java:127)
>         at
> org.apache.accumulo.core.iterators.system.SourceSwitchingIterator.seek(SourceSwitchingIterator.java:180)
>         at
> org.apache.accumulo.tserver.tablet.Tablet.nextBatch(Tablet.java:880)
>         at org.apache.accumulo.tserver.tablet.Scanner.read(Scanner.java:98)
>         at
> org.apache.accumulo.tserver.scan.NextBatchTask.run(NextBatchTask.java:69)
>         at
> org.apache.htrace.wrappers.TraceRunnable.run(TraceRunnable.java:57)
>         ... 4 more
>
>
>  I do not undestand how it is possible that the class loader is able to
> find the filter and no the lexicoder. Am I missing something?
>
> Thanks,
> Massimiliano
>
>

Mime
View raw message