Howdy,
I'm trying to send JSON to a flow file and I get the error "is not the
most recent version of this FlowFile within this session". I'm not sure
what I'm doing wrong. Here is a snippet
FlowFile split = processSession.create(original);
split = processSession.write(split, new
OutputStreamCallback() {
@Override
public void process(OutputStream out) throws
IOException {
String content = baos.toString("UTF-8");
String json = toJSON(content);
ObjectMapper mapper = new ObjectMapper();
JsonNode actualObj = mapper.readTree(json);
logger.info("JSON METADATA \n" +
mapper.defaultPrettyPrintingWriter().writeValueAsString(actualObj));
out.write(mapper.defaultPrettyPrintingWriter().writeValueAsString(actualObj).getBytes(StandardCharsets.UTF_8));
}
});
The json is written out to the log
In onTrigger(...) it set "meta" to the flow file "split" above
processSession.transfer(meta, REL_METADATA);
And it get this error
2015-09-16 16:36:48,482 ERROR [Timer-Driven Process Thread-9]
org.mitre.nifi.NiFiNITFReader
NiFiNITFReader[id=a615ceb9-fa67-4823-9eb0-310ebada5488]
NiFiNITFReader[id=a615ceb9-fa67-4823-9eb0-310ebada5488] failed to process
due to org.apache.nifi.processor.exception.FlowFileHandlingException:
StandardFlowFileRecord[uuid=865d7aac-994c-41ac-a34c-599d92df31b9,claim=1442435806141-1,offset=0,name=i_3001a.ntf,size=1049479]
is not the most recent version of this FlowFile within this session
(StandardProcessSession[id=2]); rolling back session:
org.apache.nifi.processor.exception.FlowFileHandlingException:
StandardFlowFileRecord[uuid=865d7aac-994c-41ac-a34c-599d92df31b9,claim=1442435806141-1,offset=0,name=i_3001a.ntf,size=1049479]
is not the most recent version of this FlowFile within this session
(StandardProcessSession[id=2])
thoughts?
thank you
--
View this message in context:
http://apache-nifi-developer-list.39713.n7.nabble.com/is-not-the-most-recent-version-of-this-FlowFile-within-this-session-tp2837.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.