diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java index fecaf1857c..4ad9860868 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.cluster.protocol; +import com.fasterxml.jackson.core.StreamReadConstraints; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; @@ -152,9 +153,14 @@ public class StandardDataFlow implements Serializable, DataFlow { } try { + final StreamReadConstraints streamReadConstraints = StreamReadConstraints.builder() + .maxStringLength(Integer.MAX_VALUE) + .build(); + final ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setAnnotationIntrospector(new JaxbAnnotationIntrospector(objectMapper.getTypeFactory())); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.getFactory().setStreamReadConstraints(streamReadConstraints); return objectMapper.readValue(flow, VersionedDataflow.class); } catch (final Exception e) {