[
https://issues.apache.org/jira/browse/NIFI-6897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982572#comment-16982572
]
Jeff Storck commented on NIFI-6897:
-----------------------------------
The toolkit's classpath needs to include the same JAXB dependencies that are in
NiFI's lib/java11 directory; src/main/assembly/dependencies.xml will need to be
updated to establish dependencies on the JAXB libs (and if following NiFi's
example, those libs should be added to the lib/java11 dir), and the artifacts
that invoke the toolkit binaries that use XML will have to detect the JDK
version on which they are running and add the libs (or the lib/java11 dir) to
the classpath.
> NiFi toolkit not Java 11 compatible
> -----------------------------------
>
> Key: NIFI-6897
> URL: https://issues.apache.org/jira/browse/NIFI-6897
> Project: Apache NiFi
> Issue Type: Bug
> Components: Tools and Build
> Affects Versions: 1.10.0
> Reporter: Mark Payne
> Assignee: Endre Kovacs
> Priority: Major
>
> With version 1.10.0, NiFi was made Java 11 compatible. However, the toolkit
> is not. Ran into the following error when attempting to use the CLI with Java
> 11:
> {code:java}
> bash-4.4$ $NIFI_TOOLKIT_HOME/bin/cli.sh nifi cluster-summary -ot json
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/xml/bind/annotation/XmlElement
> at
> com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:139)
> at
> com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:126)
> at
> org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyNiFiClient.jacksonJaxbJsonProvider(JerseyNiFiClient.java:359)
> at
> org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyNiFiClient.<init>(JerseyNiFiClient.java:111)
> at
> org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyNiFiClient.<init>(JerseyNiFiClient.java:57)
> at
> org.apache.nifi.toolkit.cli.impl.client.nifi.impl.JerseyNiFiClient$Builder.build(JerseyNiFiClient.java:349)
> at
> org.apache.nifi.toolkit.cli.impl.client.NiFiClientFactory.createClient(NiFiClientFactory.java:105)
> at
> org.apache.nifi.toolkit.cli.impl.client.NiFiClientFactory.createClient(NiFiClientFactory.java:44)
> at
> org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:62)
> 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:252)
> at
> org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:233)
> at
> org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:188)
> 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.xml.bind.annotation.XmlElement
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ... 15 more{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)