Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

avatar
 
1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
6 REPLIES 6

avatar

Hi, is it a custom processor or one of the standard ones?

avatar

Its a custom processor.

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar

Just added relevant lines here.

public static final Relationship SUCCESS = new Relationship.Builder().name("SUCCESS")

.description("Success relationship").build();

if (msgText != null) {

FlowFile flowFile = session.create();

flowFile = session.write(flowFile, new OutputStreamCallback() {

public void process(final OutputStream out) throws IOException {

try {

out.write(msgText.getText().getBytes());

} catch (Exception e) {

e.printStackTrace();

}

}

});

session.getProvenanceReporter().receive(flowFile, context.getProperty("MyProp").getValue());

session.transfer(flowFile, REL_SUCCESS);

}

queueConn.close();

session.commit();

avatar

Can you check you properly publish this relationship, too? E.g. see how I am doing it here (and the getRelationships() method that follows) https://github.com/aperepel/nifi-csv-bundle/blob/master/nifi-csv-processors/src/main/java/org/apache...

avatar

Thank you Andrew, it helped me resolving my issue.