Oh, I think I found the problem.

Based on the stack trace, InputBootstrapper is being loaded along with
the Hadoop Configuration object
(org.apache.hadoop.conf.Configuration), which I found in my class path
in hadoop-3.2.2/share/hadoop/client/hadoop-client-api-3.2.2.jar (and
verified by unpacking the jar and running javap on the Configuration
class to see the reference to InputBootstrapper).

However, I also ran the following and saw that class appear in two
different jars for Hadoop:
for x in $(find hadoop-3.2.2/ -name '*.jar'); do jar tf "$x" | grep
hadoop.conf.Configuration.class && echo "$x"; done
org/apache/hadoop/conf/Configuration.class
hadoop-3.2.2/share/hadoop/common/hadoop-common-3.2.2.jar
org/apache/hadoop/conf/Configuration.class
hadoop-3.2.2/share/hadoop/client/hadoop-client-api-3.2.2.jar

After inspecting
hadoop-3.2.2/share/hadoop/common/hadoop-common-3.2.2.jar, I can
confirm that the Configuration.class that is contained in that has
references to the non-shaded version of InputBootstrapper.

So, it seems like all you need to do is ensure that your jar
containing the shaded version is higher on your class path than the
one containing the reference to the non-shaded version.

So, put hadoop-3.2.2/share/hadoop/client/hadoop-client-api-3.2.2.jar
higher on your class path than
hadoop-3.2.2/share/hadoop/common/hadoop-common-3.2.2.jar
Alternatively, you could track down the upstream jar for the wstx
dependency and place that on your class path, but that's probably more
trouble than the first option.

Hope that helps!

Christopher

On Mon, Jan 25, 2021 at 10:31 PM Christopher <ctubb...@apache.org> wrote:
>
> I could not reproduce this using the precompiled Hadoop 3.2.2 binary
> tarball and Accumulo 2.0.1 using fluo-uno to run it on a single node.
>
> For fun, I ran:
> for y in $(for x in $(accumulo classpath | tr ':' ' '); do echo $x;
> done | grep \\.jar\$); do jar tf $y | grep InputBootstrapper && echo
> $y ; done
>
> And this found it in the runtime jar:
> org/apache/hadoop/shaded/com/ctc/wstx/io/InputBootstrapper.class
> ./fluo-uno/install/hadoop-3.2.2/share/hadoop/client/hadoop-client-runtime-3.2.2.jar
>
> However, looking at this and yours, it looks like I found the shaded
> version. It seems that some how you have something in your class path
> that references the non-shaded version, but I'm not sure what it could
> be.
>
> I hope that helps!
>
> On Mon, Jan 25, 2021 at 5:57 AM sam merrel <sammer...@gmx.de> wrote:
> >
> > This is the Error:
> > is that a full stack trace?
> >
> > /bin$ ./accumulo init
> > 2021-01-25 11:52:23,927 [start.Main] ERROR: Uncaught exception
> > java.lang.NoClassDefFoundError: com/ctc/wstx/io/InputBootstrapper
> >     at java.lang.Class.getDeclaredConstructors0(Native Method)
> >     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
> >     at java.lang.Class.getConstructor0(Class.java:3075)
> >     at java.lang.Class.newInstance(Class.java:412)
> >     at org.apache.accumulo.start.Main.main(Main.java:60)
> > Caused by: java.lang.ClassNotFoundException: 
> > com.ctc.wstx.io.InputBootstrapper
> >     at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
> >     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> >     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
> >     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> >     ... 5 more
> >
> >
> > My accumulo classpath looks like that:
> > /bin$ ./accumulo classpath
> > :/home/s/hadoop-3.2.2/share/hadoop/common/*
> > :/home/s/accumulo-2.0.0/conf
> > :/home/s/accumulo-2.0.0/lib/*
> > :/home/s/hadoop-3.2.2/share/*
> > :/home/s/apache-zookeeper-3.6.2-bin/*
> > :/home/s/hadoop-3.2.2/share/hadoop/client/*
> > :/home/s/hadoop-3.2.2/share/hadoop/common/lib
> >
> > I don't understand what's missing here, which jars?
> >
> >
> > Gesendet: Dienstag, 19. Januar 2021 um 17:23 Uhr
> > Von: "Christopher" <ctubb...@apache.org>
> > An: "accumulo-user" <user@accumulo.apache.org>
> > Betreff: Re: ERROR: Uncaught exception java.lang.NoClassDefFoundError: 
> > com/ctc/wstx/io/InputBootstrapper
> > This missing class is certainly not a dependency of Accumulo. It could be a 
> > dependency of Hadoop. However, there is no such version as Hadoop 3.6.2, so 
> > it could also be something unique about your environment (a non-standard 
> > version of Hadoop?). As Ed said, you should check your Accumulo class path. 
> > If you have a non-standard version of Hadoop, you may have additional jars 
> > that the default configuration of Accumulo's class path won't know about.
> >
> > A full stack trace for the error you saw would help diagnose the problem, 
> > if you're able to provide it.
> >
> > Also, please be aware that it is recommended to use Accumulo 2.0.1 instead 
> > of 2.0.0, because of CVE-2020-17533.
> >
> > On Tue, Jan 19, 2021 at 10:10 AM Ed Coleman <edcole...@apache.org> wrote:
> >>
> >> It looks like that class should be included in one of the hadoop shaded 
> >> jars.  Check your Accumulo classpath to see if the necessary and correct 
> >> hadoop jars are available.
> >>
> >> On 2021/01/19 14:55:05, sam merrel <sammer...@gmx.de> wrote:
> >> > Hi,
> >> >
> >> > I am using accumulo 2.0.0 and hadoop 3.6.2 and java 8.
> >> >
> >> > I can start Zookeeper and hadoop fine.
> >> >
> >> > But accumulo init gives me this error:
> >> >
> >> >
> >> >
> >> > ERROR: Uncaught exception
> >> > java.lang.NoClassDefFoundError: com/ctc/wstx/io/InputBootstrapper
> >> >
> >> >
> >> >
> >> > How can I solve this? I can' find anything online.
> >> >
> >> > Thanks in advance!
> >> >
> >> >
> >> >

Reply via email to