[
https://issues.apache.org/jira/browse/NIFI-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995178#comment-15995178
]
ASF GitHub Bot commented on NIFI-3787:
--------------------------------------
GitHub user markap14 opened a pull request:
https://github.com/apache/nifi/pull/1742
NIFI-3787: Addressed NPE and ensure that if validation fails due to R…
…untimeException, that it gets logged. Also clarified documentation for
Json Reader services
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number
you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] Have you ensured that the full suite of tests is executed via mvn
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to
.name (programmatic access) for each of the new properties?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in
which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build
issues and submit an update to your PR as soon as possible.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/markap14/nifi NIFI-3787
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/1742.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1742
----
----
> NullPointer while using json recordreader/recordwriter
> ------------------------------------------------------
>
> Key: NIFI-3787
> URL: https://issues.apache.org/jira/browse/NIFI-3787
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.2.0
> Reporter: Joseph Witt
> Priority: Critical
> Fix For: 1.2.0
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)