[英]NIFI: No controller service types found that are applicable for this property
I am developing a Milo OPCUA Processor and Service for Apache NiFi.我正在为 Apache NiFi 开发 Milo OPCUA 处理器和服务。 The Processor and Service compile fine, and I am able to start NiFi with them.
处理器和服务编译得很好,我可以用它们启动 NiFi。 However, when trying to configure the service for the processor that I just added, it just says "No controller service types found that are applicable for this property.".
但是,当尝试为我刚刚添加的处理器配置服务时,它只是说“找不到适用于此属性的控制器服务类型。”。
Here are my POMs:这是我的 POM:
Processor JAR处理器 JAR
<parent>
<groupId>com.tcon</groupId>
<artifactId>pubsub</artifactId>
<version>0.1</version>
</parent>
<artifactId>nifi-pubsub-processors</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-utils</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-mock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>tcon</groupId>
<artifactId>nifi-miloservice-api</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
Processor NAR处理器 NAR
<parent>
<groupId>com.tcon</groupId>
<artifactId>pubsub</artifactId>
<version>0.1</version>
</parent>
<artifactId>nifi-pubsub-nar</artifactId>
<version>0.1</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
<source.skip>true</source.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.tcon</groupId>
<artifactId>nifi-pubsub-processors</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.2.0</version>
<type>nar</type>
</dependency>
</dependencies>
The service POMs shouldn't matter, afaik.服务 POM 应该无关紧要,afaik。 They haven't been modified, save for a few Milo dependencies.
它们没有被修改,除了一些 Milo 依赖项。
As you can see, the processor JAR POM has the custom service API dependency from my custom service and the processor NAR POM has the standard API dependency from nifi.如您所见,处理器 JAR POM 具有来自我的自定义服务的自定义服务 API 依赖项,而处理器 NAR POM 具有来自 nifi 的标准 API 依赖项。
The docs say that that is all I need to do to "link" my processor to my service.文档说这就是将我的处理器“链接”到我的服务所需要做的一切。
What am I missing?我错过了什么?
You also need to register your controller service with the ServiceLoader by including a file in the src/main/resources folder of your processor JAR project.您还需要通过在处理器 JAR 项目的 src/main/resources 文件夹中包含一个文件来向 ServiceLoader 注册您的控制器服务。 You'll need a META-INF/services folder under your resources folder, with a file called
org.apache.nifi.controller.ControllerService
with a line containing the fully qualified name of the class implementing the ControllerService interface.您需要在资源文件夹下有一个 META-INF/services 文件夹,其中包含一个名为
org.apache.nifi.controller.ControllerService
的文件,其中一行包含实现 ControllerService 接口的类的完全限定名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.