- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Custom Controller Service could not be instantiated
- Labels:
-
Apache NiFi
Created 03-21-2018 04:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am developing a custom controller service to interact with Apache Phoenix. After building the NAR files I faced an InstantiationException when deploying the NARs and restarting NiFi.
Could anyone with experience developing custom processors and especially custom controller services take a look at the below error output and help point me in the right direction? I have also attached the poms as well as the bundled dependencies
Thanks in advance!!!
Here is the error output:
ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to
java.util.ServiceConfigurationError:
org.apache.nifi.controller.ControllerService: Provider
org.apache.nifi.phoenix.service.PhoenixDBCPService could not be
instantiatedjava.util.ServiceConfigurationError:
org.apache.nifi.controller.ControllerService: Provider
org.apache.nifi.phoenix.service.PhoenixDBCPService
could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:232) at java.util.ServiceLoader.access$100(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) 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:771) at org.apache.nifi.NiFi.<init>(NiFi.java:160) at
org.apache.nifi.NiFi.main(NiFi.java:268)Caused by: java.lang.InstantiationException: org.apache.nifi.phoenix.service.PhoenixDBCPService at java.lang.Class.newInstance(Class.java:427) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ... 7 common frames omitted
Caused by: java.lang.NoSuchMethodException: org.apache.nifi.phoenix.service.PhoenixDBCPService.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) ... 8 common frames omitted
Created 03-21-2018 04:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All,
I've resolved the issue - in the file "src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService" I previously had it as "org.apache.nifi.phoenix.service.PhoenixDBCPService" and after changing it to "org.apache.nifi.phoenix.service.PhoenixConnectionPool" NiFi was able to startup and I was able to use/access my custom processors.
Created 03-21-2018 04:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All,
I've resolved the issue - in the file "src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService" I previously had it as "org.apache.nifi.phoenix.service.PhoenixDBCPService" and after changing it to "org.apache.nifi.phoenix.service.PhoenixConnectionPool" NiFi was able to startup and I was able to use/access my custom processors.
