Support Questions
Find answers, ask questions, and share your expertise

Nifi failure to start on windows

Nifi failure to start on windows

2018-02-16 11:17:37,109 INFO [main] o.a.nifi.web.server.HostHeaderHandler Created HostHeaderHandler for localhost:8080
2018-02-16 11:17:37,109 INFO [main] org.apache.nifi.web.server.JettyServer Created HostHeaderHandler [HostHeaderHandler for localhost:8080]
2018-02-16 11:17:37,249 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.util.ServiceConfigurationError: org.apache.nifi.authorization.AccessPolicyProvider: org.apache.nifi.authorization.FileAccessPolicyProvider Unable to get public no-arg constructor
java.util.ServiceConfigurationError: org.apache.nifi.authorization.AccessPolicyProvider: org.apache.nifi.authorization.FileAccessPolicyProvider Unable to get public no-arg constructor
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
	at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:672)
	at java.base/java.util.ServiceLoader.access$1000(ServiceLoader.java:390)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1227)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1259)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1294)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1379)
	at org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:142)
	at org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:117)
	at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:792)
	at org.apache.nifi.NiFi.<init>(NiFi.java:160)
	at org.apache.nifi.NiFi.main(NiFi.java:268)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:659)
	at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:656)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:667)
	... 10 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 18 common frames omitted
2018-02-16 11:17:37,328 INFO [Thread-0] org.apache.nifi.NiFi Initiating shutdown of Jetty web server... 

2018-02-16 11:17:37,328 INFO [Thread-0] org.apache.nifi.NiFi Jetty web server shutdown completed (nicely or otherwise).

3 REPLIES 3
Highlighted

Re: Nifi failure to start on windows

Super Mentor

@Kiran Hebbar

Have you set the JAVA_HOME (to point to your JDK installation directory) properly before starting Nifi on Windows?

Also how are you starting it? Are you using the "run-nifi.bat" script ?

**NOTE**: Also please make sure that your JAVA_HOME does not have a Space in the Path. Usually on windows machine when the Path contains space then it can cause some issues. Like "C:/program files/jdk1.8

Highlighted

Re: Nifi failure to start on windows

@ Jay Kumar SenSharma I have set JAVA_HOME properly (Maven is working properly ) and yeah I am using run-nifi.bat

Highlighted

Re: Nifi failure to start on windows

Master Guru

@Kiran Hebbar

Sounds like you may be using Java9

Try switching to a version of Java 8 and see if you still see the same condition.

Thanks,

Matt