Support Questions

Find answers, ask questions, and share your expertise

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

 
1 ACCEPTED SOLUTION

Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.

View solution in original post

6 REPLIES 6

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

Its a custom processor.

Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.

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();

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...

Thank you Andrew, it helped me resolving my issue.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.