Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache MiNiFi C++ 0.5.0 PublishJMS "required field 'class' is missing" error

Apache MiNiFi C++ 0.5.0 PublishJMS "required field 'class' is missing" error

Explorer

Hi All!

I took an Apache NiFi 1.8.0 NiFi Template publishjms.xml that was fully working publishing to an activeMQ queue (attached)

Ran it through the minifi 0.5.0 cpp minifi converter

and got the publishjmsyml.txt (attached)

When I boot up minifi it gives the following error:

[2019-01-31 23:08:31.014] [org::apache::nifi::minifi::Properties] [info] Using configuration file located at /home/ast/nifi-minifi-cpp-0.5.0/conf/minifi-uid.properties
[2019-01-31 23:08:31.014] [main] [info] MINIFI_HOME=/home/ast/nifi-minifi-cpp-0.5.0
[2019-01-31 23:08:31.014] [org::apache::nifi::minifi::Properties] [info] Using configuration file located at /home/ast/nifi-minifi-cpp-0.5.0/conf/minifi.properties
[2019-01-31 23:08:31.032] [org::apache::nifi::minifi::FlowController] [info] FlowController NiFi Configuration file /home/ast/nifi-minifi-cpp-0.5.0/conf/config.yml
[2019-01-31 23:08:31.032] [main] [info] Loading FlowController
[2019-01-31 23:08:31.032] [org::apache::nifi::minifi::FlowController] [info] Load Flow Controller from file /home/ast/nifi-minifi-cpp-0.5.0/conf/config.yml
[2019-01-31 23:08:31.034] [org::apache::nifi::minifi::core::YamlConfiguration] [error] Unable to parse configuration file for component named 'JMSConnectionFactoryProvider' as required field 'class' is missing [in 'Controller Services' section of configuration file]
[2019-01-31 23:08:31.034] [main] [error] Failed to load configuration due to exception: Unable to parse configuration file for component named 'JMSConnectionFactoryProvider' as required field 'class' is missing [in 'Controller Services' section of configuration file]

Any ideas? The MQ client library directory is specified and the files are all there.

And ideas what the 'class' field that is missing should be called? or how it should be put in the config.yml?

Thank you all!

2 REPLIES 2
Highlighted

Re: Apache MiNiFi C++ 0.5.0 PublishJMS "required field 'class' is missing" error

Explorer

So I added a "class" section to the yml (See below) and then I get this error at the bottom instead:

Controller Services:
- id: 9e991b8d-e2e5-3955-0000-000000000000
  name: JMSConnectionFactoryProvider
  type: org.apache.nifi.jms.cf.JMSConnectionFactoryProvider
  class: JMSConnectionFactoryProvider
  Properties:
    SSL Context Service:
    broker: tcp://10.0.0.60:61616
    cf: org.apache.activemq.ActiveMQConnectionFactory
    cflib: /home/ast/apache-activemq-5.15.8/lib
    JMSConnectionFactoryProvider: org.apache.activemq.ActiveMQConnectionFactory

Does this mean My cpp minifi does not have the publishJMS processor?

[2019-01-31 23:55:14.052] [org::apache::nifi::minifi::core::FlowConfiguration] [error] No Processor defined for PublishJMS
[2019-01-31 23:55:14.052] [org::apache::nifi::minifi::core::YamlConfiguration] [error] Could not create a processor PublishJMS with id 0bb3be56-0758-39a3-0000-000000000000
[2019-01-31 23:55:14.053] [main] [error] Failed to load configuration due to exception: Could not create processor PublishJMS
Highlighted

Re: Apache MiNiFi C++ 0.5.0 PublishJMS "required field 'class' is missing" error

@johnmteabo 

You're correct, the PublishJMS processor is not included in "out of the box"  MiNiFi.

You must copy over the nar with the needed class: org.apache.nifi.jms.processors

Keep in mind, you will also have to copy over the nar with the Connection Factory Controller Service which is a required property for that processor. The two nars should be: 

nifi-jms-cf-service-nar-version-number.nar

nifi-jms-processors-nar-version-number.nar

 

The version number must match the version numbers of the current nars in the MiNiFi lib directory.

Don't have an account?
Coming from Hortonworks? Activate your account here