jfrazee opened a new issue #1696:
URL: https://github.com/apache/accumulo/issues/1696


   I'm seeing an IllegalAccessError when trying to run Accumulo shell commands 
when ./hadoop/common/lib/* on is on the classpath. The shell will open but then 
running commands results in:
   
   ```
   Exception in thread "shell" java.lang.IllegalAccessError: class 
org.apache.commons.cli.DefaultParser tried to access method 
'java.util.Collection org.apache.commons.cli.Options.getOptionGroups()' 
(org.apache.commons.cli.DefaultParser is in unnamed module of loader 
org.apache.accumulo.start.classloader.AccumuloClassLoader$2 @23bb8443; 
org.apache.commons.cli.Options is in unnamed module of loader 'app')
        at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:109)
        at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76)
        at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60)
        at org.apache.accumulo.shell.Shell.execCommand(Shell.java:839)
        at org.apache.accumulo.shell.Shell.start(Shell.java:678)
        at org.apache.accumulo.shell.Shell.execute(Shell.java:620)
        at org.apache.accumulo.start.Main$1.run(Main.java:130)
        at java.base/java.lang.Thread.run(Thread.java:834)
   ```
   
   This appears to be due to some difference in commons-cli-1.2 (packaged with 
Hadoop) and commons-cli-1.4 (packaged with Accumulo 1.10.0rc2; see #1687).
   
   I can repro this running on either Java 8 or 11, from the candidate source 
or convenience binary, and both clusters and running via uno:
   
   ```sh
   git clone https://github.com/apache/fluo-uno.git
   cd fluo-uno && mkdir ./downloads
   
   wget -O ./downloads/accumulo-1.10.0-bin.tar.gz 
https://repository.apache.org/content/repositories/orgapacheaccumulo-1086/org/apache/accumulo/accumulo/1.10.0/accumulo-1.10.0-bin.tar.gz
   
   echo "accumulo:1.10.0:$(sha512sum ./downloads/accumulo-1.10.0-bin.tar.gz | 
cut -d' ' -f1)" >> ./conf/checksums
   
   export HADOOP_VERSION=2.10.0 ACCUMULO_VERSION=1.10.0
   ./bin/uno fetch accumulo
   ./bin/uno setup accumulo
   source <(./bin/uno env)
   
   echo 'export 
CLASSPATH="${CLASSPATH}:${HADOOP_PREFIX}/share/hadoop/common/lib/*"' >> 
./install/accumulo-1.10.0/conf/accumulo-env.sh
   
   # Since this is the problematic jar, this works to break it too.
   #echo 'export 
CLASSPATH="${CLASSPATH}:${HADOOP_PREFIX}/share/hadoop/common/lib/commons-cli-1.2.jar"'
 >> ./install/accumulo-1.10.0/conf/accumulo-env.sh
   
   ./bin/uno ashell -e "createtable test" # or help, info, anything
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to