Hi,

After I installed the latest ranger Presto plugin to Presto, I found the
following error message when trying to start Presto:

2020-04-14T02:10:56.467Z INFO main
io.prestosql.security.AccessControlManager -- Loading system access control
etc/access-control.properties --
2020-04-14T02:10:56.468Z ERROR main io.prestosql.server.PrestoServer
io/airlift/bootstrap/Bootstrap
java.lang.*NoClassDefFoundError*: io/airlift/bootstrap/Bootstrap
at
org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControlFactory.create(RangerSystemAccessControlFactory.java:42)
at
io.prestosql.security.AccessControlManager.createSystemAccessControl(AccessControlManager.java:164)
at
java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Collections$2.tryAdvance(Collections.java:4747)
at java.base/java.util.Collections$2.forEachRemaining(Collections.java:4755)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at
io.prestosql.security.AccessControlManager.loadSystemAccessControl(AccessControlManager.java:140)
at io.prestosql.server.PrestoServer.run(PrestoServer.java:141)
at
io.prestosql.$gen.Presto_325_1113_gad2a4ad____20200414_021049_1.run(Unknown
Source)
at io.prestosql.server.PrestoServer.main(PrestoServer.java:73)
Caused by: java.lang.ClassNotFoundException: io.airlift.bootstrap.Bootstrap
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at
io.prestosql.server.PluginClassLoader.loadClass(PluginClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 14 more

Indeed, I didn't find 'bootstrap-<version>.jar' under the plugin directory.
The following is a complete list of my installed plugin dir:

$ find plugin/ranger
plugin/ranger
plugin/ranger/ranger-presto-plugin-shim-2.1.0-SNAPSHOT.jar
plugin/ranger/ranger-plugin-classloader-2.1.0-SNAPSHOT.jar
plugin/ranger/ranger-presto-plugin-impl
plugin/ranger/ranger-presto-plugin-impl/noggit-0.8.jar
plugin/ranger/ranger-presto-plugin-impl/jackson-core-asl-1.9.13.jar
plugin/ranger/ranger-presto-plugin-impl/jna-5.2.0.jar
plugin/ranger/ranger-presto-plugin-impl/guava-25.1-jre.jar
plugin/ranger/ranger-presto-plugin-impl/javax.persistence-2.1.0.jar
plugin/ranger/ranger-presto-plugin-impl/jna-platform-5.2.0.jar
plugin/ranger/ranger-presto-plugin-impl/jersey-bundle-1.19.3.jar
plugin/ranger/ranger-presto-plugin-impl/solr-solrj-7.7.1.jar
plugin/ranger/ranger-presto-plugin-impl/jersey-server-1.19.jar
plugin/ranger/ranger-presto-plugin-impl/ranger-presto-plugin-2.1.0-SNAPSHOT.jar
plugin/ranger/ranger-presto-plugin-impl/commons-collections-3.2.2.jar
plugin/ranger/ranger-presto-plugin-impl/commons-cli-1.2.jar
plugin/ranger/ranger-presto-plugin-impl/hadoop-common-3.1.1.jar
plugin/ranger/ranger-presto-plugin-impl/jersey-core-1.19.jar
plugin/ranger/ranger-presto-plugin-impl/commons-io-2.5.jar
plugin/ranger/ranger-presto-plugin-impl/jackson-jaxrs-1.9.13.jar
plugin/ranger/ranger-presto-plugin-impl/jersey-json-1.19.jar
plugin/ranger/ranger-presto-plugin-impl/gson-2.2.4.jar
plugin/ranger/ranger-presto-plugin-impl/jackson-xc-1.9.2.jar
plugin/ranger/ranger-presto-plugin-impl/commons-logging-1.2.jar
plugin/ranger/ranger-presto-plugin-impl/htrace-core4-4.1.0-incubating.jar
plugin/ranger/ranger-presto-plugin-impl/httpmime-4.5.6.jar
plugin/ranger/ranger-presto-plugin-impl/stax2-api-3.1.4.jar
plugin/ranger/ranger-presto-plugin-impl/httpclient-4.5.6.jar
plugin/ranger/ranger-presto-plugin-impl/hadoop-auth-3.1.1.jar
plugin/ranger/ranger-presto-plugin-impl/commons-configuration2-2.1.1.jar
plugin/ranger/ranger-presto-plugin-impl/eclipselink-2.5.2.jar
plugin/ranger/ranger-presto-plugin-impl/jackson-mapper-asl-1.9.13.jar
plugin/ranger/ranger-presto-plugin-impl/ranger-plugins-audit-2.1.0-SNAPSHOT.jar
plugin/ranger/ranger-presto-plugin-impl/commons-lang-2.6.jar
plugin/ranger/ranger-presto-plugin-impl/woodstox-core-5.0.3.jar
plugin/ranger/ranger-presto-plugin-impl/ranger-plugins-cred-2.1.0-SNAPSHOT.jar
plugin/ranger/ranger-presto-plugin-impl/gethostname4j-0.0.2.jar
plugin/ranger/ranger-presto-plugin-impl/commons-codec-1.11.jar
plugin/ranger/ranger-presto-plugin-impl/ranger-plugins-common-2.1.0-SNAPSHOT.jar

Looking at Ranger Presto plugin's source code, 'ranger-presto-plugin-shim'
has a dependency on bootstrap
<https://github.com/apache/ranger/blob/master/ranger-presto-plugin-shim/pom.xml#L51>.
However, because 'ranger-presto-plugin-shim' pom.xml didn't declare the
packaging type as '<packaging>presto-plugin</packaging>' as required
<https://prestosql.io/docs/current/develop/spi-overview.html#plugin-metadata>
by
Presto, but rather '<packaging>jar</packaging>
<https://github.com/apache/ranger/blob/master/ranger-presto-plugin-shim/pom.xml#L23>',
Maven didn't populate all dependency jars in the plugin dir.

Is this a known issue, or did I miss something obvious? Thanks!

Regards,
Chongfeng Hu

Reply via email to