Conrad, The issue you discovered and reported is now merged into master and fixed. Should make it into the 0.6.0 release.
https://issues.apache.org/jira/browse/NIFI-1632 Thanks Joe On Wed, Mar 16, 2016 at 11:27 AM, Joe Witt <[email protected]> wrote: > Full stop if you ever see a NullPointerException coming out of a > processor it is 1000% a bug every time and please ping us any time. > > Thanks > Joe > > On Wed, Mar 16, 2016 at 11:20 AM, Conrad Crampton > <[email protected]> wrote: >> Hi Joe, >> Great (not that it’s a bug) that I’m not going mad. >> Thanks for looking into it. >> Regards >> Conrad >> >> >> >> On 16/03/2016, 15:16, "Joe Witt" <[email protected]> wrote: >> >>>Conrad, >>> >>>Ahhh i *think* you have found a bug that is present. It appears to be >>>this line. We should be doing a null check there before checking >>>length of value. >>> >>>https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExtractText.java#L325 >>> >>>Will put in a JIRA and address immediately. >>> >>>Thanks >>>Joe >>> >>>On Wed, Mar 16, 2016 at 11:08 AM, Conrad Crampton >>><[email protected]> wrote: >>>> Hi, >>>> I don’t know if this is expected behaviour but I think I understand why >>>> this >>>> is happening now. I have a regexp in the ExtractText processors viz: >>>> >>>> (?s:^.+: (\d\d?)(\w\w\w)(\d{4}) ([\d ]\d:\d\d:\d\d) Product=(.+?) >>>> OriginIP=(.+?) Origin=(.+?) Action=(.+?) SIP=(.+?) Source=(.+?) >>>> SPort=(\d+?) >>>> DIP=(.+) Destination=(.+?) DPort=(\d+?) Protocol=(.+?)(?: ICMPType=(.+?) >>>> ICMPCode=(.+?))? IFName=(.+?) IFDirection=(.+?) Reason=(.+?) Rule=(.+?) >>>> PolicyName=(.+?) Info=(.+?) XlateSIP=(.+?) XlateSPort=([\d]+|\-?) >>>> XlateDIP=(.+?) XlateDPort=([\d]+|\-?)(.*)$) >>>> >>>> With this (?: ICMPType=(.+?) ICMPCode=(.+?))? the problem I think. Because >>>> I have made a non capturing matching group optional, for those log lines >>>> that don’t have this section matching the dynamic variable can’t set the >>>> index correctly as the match is returning null for these capture groups. >>>> Obviously I haven’t gone too deep into the code, but if I have a >>>> RouteOnContent processor before this testing for this string and remove >>>> this >>>> from regexp (and have two ExtractText processors) then it works. It >>>> appeared >>>> that all the NPE were thrown for those lines that didn’t match the optional >>>> matching group. >>>> >>>> Has this been observed before? >>>> >>>> Thanks >>>> Conrad >>>> >>>> From: Conrad Crampton <[email protected]> >>>> Reply-To: "[email protected]" <[email protected]> >>>> Date: Wednesday, 16 March 2016 at 12:01 >>>> To: "[email protected]" <[email protected]> >>>> Subject: NPE in ExtractText >>>> >>>> Hi, >>>> I’m getting repeated NullPointerException reported for an ExtractText >>>> processor (processing the resultant splits from a ListenSyslog) thus: >>>> >>>> datanode2-cm1.mis-cds.local:9092ExtractText[id=4372efbf-efcf-3065-acd4-b8fdb91d64fb] >>>> ExtractText[id=4372efbf-efcf-3065-acd4-b8fdb91d64fb] failed to process due >>>> to java.lang.NullPointerException; rolling back session: >>>> java.lang.NullPointerException >>>> >>>> The same error appears for each node in my cluster too so not specific to >>>> one node. >>>> I have enabled additional logging for ExtractText processor (I think) by >>>> adding >>>> >>>> <logger name="org.apache.nifi.processors.standard.ExtractText" >>>> level=“DEBUG" >>>> additivity="false"> >>>> <appender-ref ref="USER_FILE"/> >>>> </logger> >>>> >>>> To each logback.xml on each node, but this doesn’t give any more details as >>>> to why the NPE. >>>> Flowflies are getting through the processor but concerned about the errors >>>> as clearly something isn’t correct so suggestions welcome. >>>> >>>> Thanks >>>> Conrad >>>> >>>> >>>> SecureData, combating cyber threats >>>> >>>> ________________________________ >>>> >>>> The information contained in this message or any of its attachments may be >>>> privileged and confidential and intended for the exclusive use of the >>>> intended recipient. If you are not the intended recipient any disclosure, >>>> reproduction, distribution or other dissemination or use of this >>>> communications is strictly prohibited. The views expressed in this email >>>> are >>>> those of the individual and not necessarily of SecureData Europe Ltd. Any >>>> prices quoted are only valid if followed up by a formal written quote. >>>> >>>> SecureData Europe Limited. Registered in England & Wales 04365896. >>>> Registered Address: SecureData House, Hermitage Court, Hermitage Lane, >>>> Maidstone, Kent, ME16 9NT >>>> >>>> >>>> >>>> ***This email originated outside SecureData*** >>>> >>>> Click here to report this email as spam.
