[
https://issues.apache.org/jira/browse/NIFI-6216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825224#comment-16825224
]
David Sargrad edited comment on NIFI-6216 at 4/24/19 2:35 PM:
--------------------------------------------------------------
It strikes me that the schema that is inferred for each of the two XML records
is slightly different. So that a schema derived from an inference on the first
fails on the second. Is there a way that I can extract the schema that is
inferred in each case, so that I can merge into a super-set schema that will
work?
was (Author: dsargrad):
It strikes me that the schema that is inferred for each of the two XML records
is slightly different. So that an inference on the first fails on the second.
Is there a way that I can extract the schema that is inferred in each case, so
that I can merge into a super-set schema that will work?
> NIFI ConvertRecord Processor throws exception
> ---------------------------------------------
>
> Key: NIFI-6216
> URL: https://issues.apache.org/jira/browse/NIFI-6216
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.9.2
> Reporter: David Sargrad
> Priority: Major
> Attachments: ConvertRecord_Failure_Recreation.xml,
> ConvertRecord_Problem_Further_Isolated.xml,
> image-2019-04-15-14-29-39-872.png, image-2019-04-24-10-06-28-020.png
>
>
> ConvertRecord is throwing an exception on some of my data. I am using
> ConvertRecord in a schema inference mode.
>
> It doesnt always fail, for much of the data that i pass into the flow it
> infers and processes the data properly. However some of the data causes this
> failure.
>
> I am using an XMLReader and a JSONRecordSetWriter.
>
> The exception is seen in the log as follows
> {code:java}
> 2019-04-12 09:49:26,810 ERROR [Timer-Driven Process Thread-6]
> o.a.n.processors.standard.ConvertRecord
> ConvertRecord[id=016a1079-25cf-16fd-fbfa-785d65603736] Failed to write
> MapRecord[{dpTransitionFix=MTU, star=MapRecord[{routeType=STAR,
> routeName=VKTRY2}], departureFixAndTime=MapRecord[{fixName=MTU,
> arrTime=2019-04-12T14:06:55Z}], starTransitionFix=MDANO,
> rvsmData=MapRecord[{futureCompliance=true, equipped=true,
> currentCompliance=true}],
> routeOfFlight=KSLC.RUGGD1.MTU..HBU..PNH..MDANO.VKTRY2.KDFW/1551,
> dp=MapRecord[{routeType=DIRECT, routeName=RUGGD1}],
> diversionIndicator=NO_DIVERSION, eta=MapRecord[{etaType=ESTIMATED,
> timeValue=2019-04-12T15:50:43Z}],
> etd=MapRecord[{timeValue=2019-04-12T13:47:00Z, etdType=ESTIMATED}],
> nextPosition=MapRecord[{longitudeDecimal=-111.9777733,
> latitudeDecimal=40.7883933}],
> flightTraversalData2=MapRecord[{waypoint=[Ljava.lang.Object;@6aca8e9d,
> fix=[Ljava.lang.Object;@35df6693, airway=[Ljava.lang.Object;@4300900c,
> center=[Ljava.lang.Object;@550b388b, sector=[Ljava.lang.Object;@6b0bfad1}],
> arrivalFixAndTime=MapRecord[{fixName=VKTRY, arrTime=2019-04-12T15:40:09Z}]}]
> with schema [] as a JSON Object due to java.lang.ClassCastException:
> java.lang.ClassCastExceptionjava.lang.ClassCastException: null 2019-04-12
> 09:49:26,810 ERROR [Timer-Driven Process Thread-6]
> o.a.n.processors.standard.ConvertRecord
> ConvertRecord[id=016a1079-25cf-16fd-fbfa-785d65603736] Failed to write
> MapRecord[{dpTransitionFix=MTU, star=MapRecord[{routeType=STAR,
> routeName=VKTRY2}], departureFixAndTime=MapRecord[{fixName=MTU,
> arrTime=2019-04-12T14:06:55Z}], starTransitionFix=MDANO,
> rvsmData=MapRecord[{futureCompliance=true, equipped=true,
> currentCompliance=true}],
> routeOfFlight=KSLC.RUGGD1.MTU..HBU..PNH..MDANO.VKTRY2.KDFW/1551,
> dp=MapRecord[{routeType=DIRECT, routeName=RUGGD1}],
> diversionIndicator=NO_DIVERSION, eta=MapRecord[{etaType=ESTIMATED,
> timeValue=2019-04-12T15:50:43Z}],
> etd=MapRecord[{timeValue=2019-04-12T13:47:00Z, etdType=ESTIMATED}],
> nextPosition=MapRecord[{longitudeDecimal=-111.9777733,
> latitudeDecimal=40.7883933}],
> flightTraversalData2=MapRecord[{waypoint=[Ljava.lang.Object;@6aca8e9d,
> fix=[Ljava.lang.Object;@35df6693, airway=[Ljava.lang.Object;@4300900c,
> center=[Ljava.lang.Object;@550b388b, sector=[Ljava.lang.Object;@6b0bfad1}],
> arrivalFixAndTime=MapRecord[{fixName=VKTRY, arrTime=2019-04-12T15:40:09Z}]}]
> with schema [] as a JSON Object due to java.lang.ClassCastException:
> java.lang.ClassCastExceptionjava.lang.ClassCastException: null
> {code}
>
> I've created a simple template to allow recreation of the problem. See
> attached.
> !image-2019-04-15-14-29-39-872.png![^ConvertRecord_Failure_Recreation.xml]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)