[ 
https://issues.apache.org/jira/browse/NIFI-4967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16396202#comment-16396202
 ] 

ASF GitHub Bot commented on NIFI-4967:
--------------------------------------

GitHub user pvillard31 opened a pull request:

    https://github.com/apache/nifi/pull/2536

    NIFI-4967 - CSVRecordReader does not read header with specific formats

    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/pvillard31/nifi NIFI-4967

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2536.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 #2536
    
----
commit c567233bd7a76c741ae1b4bd50e3fcbfe9ebf766
Author: Pierre Villard <pierre.villard.fr@...>
Date:   2018-03-12T22:44:06Z

    NIFI-4967 - CSVRecordReader does not read header with specific formats

----


> CSVRecordReader does not read header with specific formats
> ----------------------------------------------------------
>
>                 Key: NIFI-4967
>                 URL: https://issues.apache.org/jira/browse/NIFI-4967
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.5.0
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>            Priority: Major
>
> When using a specific CSV format (example Microsoft Excel) in the CSV reader 
> (with schema defined from header, and Apache Commons CSV parser), the CSV 
> reader is not correctly initialized and the header is null leading to a NPE 
> which is not clearly exposed. Instead the following exception can be seen:
> {noformat}
> 2018-03-12 23:34:30,427 WARN [Timer-Driven Process Thread-5] 
> o.a.nifi.processors.standard.QueryRecord 
> QueryRecord[id=4428e3a1-cf73-377f-150d-98d404785786] Processor 
> Administratively Yielded for 1 sec due to processing failure
> 2018-03-12 23:34:30,427 WARN [Timer-Driven Process Thread-5] 
> o.a.n.c.t.ContinuallyRunProcessorTask Administratively Yielding 
> QueryRecord[id=4428e3a1-cf73-377f-150d-98d404785786] due to uncaught 
> Exception: java.lang.IllegalStateException: 
> StandardFlowFileRecord[uuid=c5f428f0-0fa8-4660-b0df-6974bbd82f47,claim=StandardContentClaim
>  [resourceClaim=StandardResourceClaim[id=1520889888555-181, 
> container=default, section=181], offset=604078, 
> length=37421],offset=0,name=865467214336135,size=37421] already in use for an 
> active callback or an InputStream created by ProcessSession.read(FlowFile) 
> has not been closed
> 2018-03-12 23:34:30,427 WARN [Timer-Driven Process Thread-5] 
> o.a.n.c.t.ContinuallyRunProcessorTask
> java.lang.IllegalStateException: 
> StandardFlowFileRecord[uuid=c5f428f0-0fa8-4660-b0df-6974bbd82f47,claim=StandardContentClaim
>  [resourceClaim=StandardResourceClaim[id=1520889888555-181, 
> container=default, section=181], offset=604078, 
> length=37421],offset=0,name=865467214336135,size=37421] already in use for an 
> active callback or an InputStream created by ProcessSession.read(FlowFile) 
> has not been closed
>         at 
> org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3060)
>         at 
> org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3055)
>         at 
> org.apache.nifi.controller.repository.StandardProcessSession.transfer(StandardProcessSession.java:1854)
>         at 
> org.apache.nifi.processors.standard.QueryRecord.onTrigger(QueryRecord.java:378)
>         at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>         at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>         at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
>         at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>         at 
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)
>         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){noformat}



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

Reply via email to