Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3787

NullPointer while using json recordreader/recordwriter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: Extensions
    • Labels:
      None

      Description

      2017-05-03 09:54:34,947 ERROR [Timer-Driven Process Thread-13] o.a.nifi.processors.standard.QueryRecord QueryRecord[id=ce897ee6-015b-1000-430c-d128f860a1df] Unable to query Standar
      dFlowFileRecord[uuid=d843c811-d047-42a5-9951-7c05953fa43a,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1493819646561-1390, container=default, section=366], of
      fset=705664, length=2192],offset=0,name=579032883325039,size=2192] due to org.apache.nifi.processor.exception.ProcessException: Failed to determine schema of data records for Stand
      ardFlowFileRecord[uuid=d843c811-d047-42a5-9951-7c05953fa43a,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1493819646561-1390, container=default, section=366],
      offset=705664, length=2192],offset=0,name=579032883325039,size=2192]: {}
      org.apache.nifi.processor.exception.ProcessException: Failed to determine schema of data records for StandardFlowFileRecord[uuid=d843c811-d047-42a5-9951-7c05953fa43a,claim=Standard
      ContentClaim [resourceClaim=StandardResourceClaim[id=1493819646561-1390, container=default, section=366], offset=705664, length=2192],offset=0,name=579032883325039,size=2192]
      at org.apache.nifi.queryrecord.FlowFileTable.getRowType(FlowFileTable.java:155)
      at org.apache.calcite.sql.validate.EmptyScope.resolve_(EmptyScope.java:160)
      at org.apache.calcite.sql.validate.EmptyScope.resolveTable(EmptyScope.java:99)
      at org.apache.calcite.sql.validate.DelegatingScope.resolveTable(DelegatingScope.java:202)
      at org.apache.calcite.sql.validate.IdentifierNamespace.resolveImpl(IdentifierNamespace.java:104)
      at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:167)
      at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:931)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:912)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2941)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2926)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3168)
      at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60)
      at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:931)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:912)
      at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:220)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:887)
      at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:597)
      at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:547)
      at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:239)
      at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:203)
      at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:776)
      at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:632)
      at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:602)
      at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
      at org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement_(CalciteConnectionImpl.java:196)
      at org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement(CalciteConnectionImpl.java:185)
      at org.apache.calcite.jdbc.CalciteConnectionImpl.prepareStatement(CalciteConnectionImpl.java:86)
      at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:165)
      at org.apache.nifi.processors.standard.QueryRecord.buildCachedStatement(QueryRecord.java:382)
      at org.apache.nifi.processors.standard.QueryRecord.getStatement(QueryRecord.java:369)
      at org.apache.nifi.processors.standard.QueryRecord.queryWithCache(QueryRecord.java:429)
      at org.apache.nifi.processors.standard.QueryRecord.onTrigger(QueryRecord.java:278)
      at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
      at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1118)
      at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:144)
      at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
      at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException: null
      at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:598)
      at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:580)
      at org.apache.nifi.serialization.record.util.DataTypeUtils.getDateFormat(DataTypeUtils.java:447)
      at org.apache.nifi.json.JsonTreeRowRecordReader.<init>(JsonTreeRowRecordReader.java:59)
      at org.apache.nifi.json.JsonTreeReader.createRecordReader(JsonTreeReader.java:73)
      at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
      at com.sun.proxy.$Proxy129.createRecordReader(Unknown Source)
      at org.apache.nifi.queryrecord.FlowFileTable.getRowType(FlowFileTable.java:152)
      ... 45 common frames omitted

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                markap14 Mark Payne
                Reporter:
                joewitt Joe Witt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: