You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2018/11/07 20:12:00 UTC

[jira] [Created] (NIFI-5800) If RecordSchema has an inner field that references a schema recursively by name, hashCode() throws StackOverflowError

Mark Payne created NIFI-5800:
--------------------------------

             Summary: If RecordSchema has an inner field that references a schema recursively by name, hashCode() throws StackOverflowError
                 Key: NIFI-5800
                 URL: https://issues.apache.org/jira/browse/NIFI-5800
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Mark Payne


If we have a schema where a field is of type RECORD and references an outer-level schema, we get StackOverflowError. For example:

{
  "name": "person",
  "namespace": "nifi",
  "type": "record",
  "fields": [
      { "name": "name", "type": "string" },
      { "name": "mother", "type": "person" }
  ]
}

In this case, if we attempt to add this schema to a HashMap, we get the following error:

2018-11-07 19:09:33,021 ERROR [Timer-Driven Process Thread-38] o.a.n.p.k.pubsub.ConsumeKafkaRecord_2_0 ConsumeKafkaRecord_2_0[id=ef6bd50b-0166-1000-ffff-fffff55a7995] Exception while processing data from kafka so will close the lease org.apache.nifi.processors.kafka.pubsub.ConsumerPool$SimpleConsumerLease@26706081 due to java.lang.StackOverflowError: java.lang.StackOverflowError
java.lang.StackOverflowError: null
        at java.util.AbstractList.hashCode(AbstractList.java:540)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
        at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
        at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
        at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
        at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
        at java.util.AbstractList.hashCode(AbstractList.java:541)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
        at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
        at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
        at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
        at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
        at java.util.AbstractList.hashCode(AbstractList.java:541)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
        at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
        at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
        at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
        at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
        at java.util.AbstractList.hashCode(AbstractList.java:541)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
        at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
        at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
        at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
        at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
        at java.util.AbstractList.hashCode(AbstractList.java:541)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
        at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
        at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
        at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
        at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
        at java.util.AbstractList.hashCode(AbstractList.java:541)
        at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
...




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)