Support Questions

Find answers, ask questions, and share your expertise

Unable to start nifi registry on Ubuntu

avatar
New Contributor

I wanted to try with Nifi registry on Ubuntu today, but it failed to start. Nifi works well on the same machine.

 

NiFi registry version is 0.5

Java version is 13.0.1

 

The error log is below:

2020-01-04 09:08:45,023 ERROR [main] o.springframework.boot.SpringApplication Application run failed
java.lang.IllegalStateException: Cannot load configuration class: org.apache.nifi.registry.security.authorization.AuthorizerFactory
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:413)

....

Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:177)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:364)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:508)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:465)
at org.apache.nifi.registry.security.authorization.AuthorizerFactory.initializeJaxbContext(AuthorizerFactory.java:83)
... 55 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory

 

 

----------------------------

I also tried to build it from source code but it failed at building nifi-registry-properties step.

ailed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.5:testCompile (default) on project nifi-registry-properties: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: BUG!

 

Any help could be appreciated. 

1 ACCEPTED SOLUTION

avatar
New Contributor

I've found the cause and fixed it.

 

The reason is I was using JDK 13 which has removed the library JAXB-API. 

After I downgrade JDK from 13 to 8 with below command

sudo apt install openjdk-8-jre-headless

 

It works. Don't forget to reset Java_Home environment variable.

 

Ps: don't forget to open port of nifi-registry

Hope it is helpful to someone.

 

View solution in original post

1 REPLY 1

avatar
New Contributor

I've found the cause and fixed it.

 

The reason is I was using JDK 13 which has removed the library JAXB-API. 

After I downgrade JDK from 13 to 8 with below command

sudo apt install openjdk-8-jre-headless

 

It works. Don't forget to reset Java_Home environment variable.

 

Ps: don't forget to open port of nifi-registry

Hope it is helpful to someone.