Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

nifi-toolkit cli to list registry bucket is giving error 'NoClassDefFoundError: javax/annotation/Priority'

avatar
Master Collaborator

Hello,

I am trying to use nifi toolkit cli to list the bucket in Nifi registry using below command -
/usr/hdf/3.4.1.1-4/nifi-toolkit/bin/cli.sh registry list-buckets -u
http://<ip>:<port>

But getting below error :

/usr/hdf/3.4.1.1-4/nifi-toolkit$ /usr/hdf/3.4.1.1-4/nifi-toolkit/bin/cli.sh registry list-buckets -u http://<ip>:<port>
cli.sh: JAVA_HOME not set; results may vary
Exception in thread "main" java.lang.NoClassDefFoundError: javax/annotation/Priority
        at org.glassfish.jersey.model.internal.ComponentBag.modelFor(ComponentBag.java:551)
        at org.glassfish.jersey.model.internal.ComponentBag.lambda$registerModel$10(ComponentBag.java:477)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
        at org.glassfish.jersey.model.internal.ComponentBag.registerModel(ComponentBag.java:469)
        at org.glassfish.jersey.model.internal.ComponentBag.register(ComponentBag.java:380)
        at org.glassfish.jersey.model.internal.CommonConfig.register(CommonConfig.java:454)
        at org.glassfish.jersey.client.ClientConfig$State.register(ClientConfig.java:242)
        at org.glassfish.jersey.client.ClientConfig.register(ClientConfig.java:619)
        at org.apache.nifi.registry.client.impl.JerseyNiFiRegistryClient.<init>(JerseyNiFiRegistryClient.java:110)
        at org.apache.nifi.registry.client.impl.JerseyNiFiRegistryClient.<init>(JerseyNiFiRegistryClient.java:54)
        at org.apache.nifi.registry.client.impl.JerseyNiFiRegistryClient$Builder.build(JerseyNiFiRegistryClient.java:226)
        at org.apache.nifi.toolkit.cli.impl.client.NiFiRegistryClientFactory.createClient(NiFiRegistryClientFactory.java:96)
        at org.apache.nifi.toolkit.cli.impl.client.NiFiRegistryClientFactory.createClient(NiFiRegistryClientFactory.java:39)
        at org.apache.nifi.toolkit.cli.impl.command.registry.AbstractNiFiRegistryCommand.doExecute(AbstractNiFiRegistryCommand.java:55)
        at org.apache.nifi.toolkit.cli.impl.command.AbstractPropertyCommand.execute(AbstractPropertyCommand.java:74)
        at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processCommand(CommandProcessor.java:251)
        at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:232)
        at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:187)
        at org.apache.nifi.toolkit.cli.CLIMain.runSingleCommand(CLIMain.java:145)
        at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:72)
Caused by: java.lang.ClassNotFoundException: javax.annotation.Priority
        at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)
        at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)
        at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
        ... 22 more
u

This machine has Java 9 openJDK.

java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

Any help would be appreciated.

Thanks,

Mahendra

1 ACCEPTED SOLUTION

avatar
Master Guru

Use JDK 8 or JDK 11, JDK 9 is not supported

 

JDK 9 issues https://github.com/graphhopper/graphhopper/issues/1391

View solution in original post

1 REPLY 1

avatar
Master Guru

Use JDK 8 or JDK 11, JDK 9 is not supported

 

JDK 9 issues https://github.com/graphhopper/graphhopper/issues/1391