<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Custom NiFi processor gets &amp;quot;ControllerServices may be referenced only via their interfaces&amp;quot; error. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131454#M55846</link>
    <description>&lt;P&gt;I have built a custom controller service and custom processor. I am able to build and run tests in IntelliJ on my laptop. Once the maven build is successfully complete, I copied all the 3 nar files and dropped them in the lib folder of NiFi.&lt;/P&gt;&lt;P&gt;In NiFi web interface, I can the see my custom service in Controller Service page. I am able to configure it and enable it. NiFi logs confirms the service is online. Now, when I drop the custom processor, I cannot see the service to choose in drop down. Event though it is service is running.&lt;/P&gt;&lt;P&gt;I verified the dependencies in pom for all nar modules.&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;nifi-customservice-api-nar&lt;/LI&gt;&lt;LI&gt;nifi-customservice-nar&lt;/LI&gt;&lt;LI&gt;nifi-LookupProcessor-nar&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Following is the error in the NiFi app log:&lt;/P&gt;&lt;P&gt;java.lang.IllegalArgumentException: ControllerServices may be referenced only via their interfaces; class org.pwc.nifi.customservice.LookupService is not an interface
at org.apache.nifi.attribute.expression.language.StandardPropertyValue.asControllerService(StandardPropertyValue.java:172) ~[nifi-expression-language-1.1.1.jar:1.1.1]
at org.pwc.nifi.customservice.LookupProcessor.onTrigger(LookupProcessor.java:79) ~[na:na]
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) ~[nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.1.jar:1.1.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_91]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_91]&lt;/P&gt;&lt;P&gt;I would appreciate if someone can help with :&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;Resolving missing service in drop down when configuring the processor in properties.&lt;/LI&gt;&lt;LI&gt;Resolving error "java.lang.IllegalArgumentException: ControllerServices may be referenced only via their interfaces"&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 06:48:48 GMT</pubDate>
    <dc:creator>ajviradia</dc:creator>
    <dc:date>2017-03-01T06:48:48Z</dc:date>
    <item>
      <title>Custom NiFi processor gets "ControllerServices may be referenced only via their interfaces" error.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131454#M55846</link>
      <description>&lt;P&gt;I have built a custom controller service and custom processor. I am able to build and run tests in IntelliJ on my laptop. Once the maven build is successfully complete, I copied all the 3 nar files and dropped them in the lib folder of NiFi.&lt;/P&gt;&lt;P&gt;In NiFi web interface, I can the see my custom service in Controller Service page. I am able to configure it and enable it. NiFi logs confirms the service is online. Now, when I drop the custom processor, I cannot see the service to choose in drop down. Event though it is service is running.&lt;/P&gt;&lt;P&gt;I verified the dependencies in pom for all nar modules.&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;nifi-customservice-api-nar&lt;/LI&gt;&lt;LI&gt;nifi-customservice-nar&lt;/LI&gt;&lt;LI&gt;nifi-LookupProcessor-nar&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Following is the error in the NiFi app log:&lt;/P&gt;&lt;P&gt;java.lang.IllegalArgumentException: ControllerServices may be referenced only via their interfaces; class org.pwc.nifi.customservice.LookupService is not an interface
at org.apache.nifi.attribute.expression.language.StandardPropertyValue.asControllerService(StandardPropertyValue.java:172) ~[nifi-expression-language-1.1.1.jar:1.1.1]
at org.pwc.nifi.customservice.LookupProcessor.onTrigger(LookupProcessor.java:79) ~[na:na]
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) ~[nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.1.jar:1.1.1]
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.1.jar:1.1.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_91]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_91]&lt;/P&gt;&lt;P&gt;I would appreciate if someone can help with :&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;Resolving missing service in drop down when configuring the processor in properties.&lt;/LI&gt;&lt;LI&gt;Resolving error "java.lang.IllegalArgumentException: ControllerServices may be referenced only via their interfaces"&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 06:48:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131454#M55846</guid>
      <dc:creator>ajviradia</dc:creator>
      <dc:date>2017-03-01T06:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom NiFi processor gets "ControllerServices may be referenced only via their interfaces" error.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131455#M55847</link>
      <description>&lt;P&gt;It is hard to tell without being able to see your code, but it seems like this is saying that in LookupProcessor you have a PropertyDescriptor that represents a Controller Service, but the class you specified is not the interface from nifi-customservice-api-nar, but instead it is the implementation from nifi-customservice-nar. &lt;/P&gt;&lt;P&gt;As an example, InvokeHttp uses SSLContextService:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L205" target="_blank"&gt;https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L205&lt;/A&gt;&lt;/P&gt;&lt;P&gt;SSLContextService is the interface that comes from nifi-standard-services-api:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java" target="_blank"&gt;https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The implementation is StandardSSLContextService which is is nifi-ssl-context-bundle:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java" target="_blank"&gt;https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:03:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131455#M55847</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2017-03-01T22:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom NiFi processor gets "ControllerServices may be referenced only via their interfaces" error.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131456#M55848</link>
      <description>&lt;P&gt;Your explanation helped me in identify the core issue. You are correct in assuming I was calling the service implementation rather than the interface. Once I made appropriate changes in my code and unit tested, I was able to drop in NiFi and have the integration testing done. &lt;/P&gt;&lt;P&gt;I was able to configure the custom service by adding it in drop down on the custom Lookup processor in NiFi Web UI.&lt;/P&gt;&lt;P&gt;THANK YOU for all the help!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 01:16:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Custom-NiFi-processor-gets-quot-ControllerServices-may-be/m-p/131456#M55848</guid>
      <dc:creator>ajviradia</dc:creator>
      <dc:date>2017-03-02T01:16:24Z</dc:date>
    </item>
  </channel>
</rss>

