Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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

avatar
 
1 ACCEPTED SOLUTION

avatar

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

avatar

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

avatar

Its a custom processor.

avatar

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.

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.