[jira] [Created] (NIFI-4326) ExtractEmailHeaders.java unhandled NullPointerException
Benjamin Wood created NIFI-4326: --- Summary: ExtractEmailHeaders.java unhandled NullPointerException Key: NIFI-4326 URL: https://issues.apache.org/jira/browse/NIFI-4326 Project: Apache NiFi Issue Type: Bug Components: Core Framework Affects Versions: 1.3.0 Reporter: Benjamin Wood Priority: Minor The ExtractEmailHeaders using processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. I've already written a patch and submitted it to github as pull request #2111 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled NullPointerException
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Description: The ExtractEmailHeaders processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. I've already written a patch and submitted it to github as pull request #2111 was: The ExtractEmailHeaders using processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. I've already written a patch and submitted it to github as pull request #2111 > ExtractEmailHeaders.java unhandled NullPointerException > --- > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 >Reporter: Benjamin Wood >Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > I've already written a patch and submitted it to github as pull request #2111 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Environment: jdk 1.8.0_121-b13 Description: The ExtractEmailHeaders processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. If an address is empty (<> or " ") then getRecipients() will throw an "Empty Address" AddressException It's possible this is only an issue with Oracle Java. was: The ExtractEmailHeaders processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. I've already written a patch and submitted it to github as pull request #2111 Summary: ExtractEmailHeaders.java unhandled Exceptions (was: ExtractEmailHeaders.java unhandled NullPointerException) > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144279#comment-16144279 ] Benjamin Wood commented on NIFI-4326: - Patch needs work, because of the newly discovered issue with getRecipients() Will continue to iterate on patch-test until a workable solution is found. The contract states that it will collect data "if available", meaning it should accept messages with no addressee or lists containing empty addresses. > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144345#comment-16144345 ] Benjamin Wood commented on NIFI-4326: - Using grepcode as a reference, should be able to substitute "getRecipients" with "getHeaderAsInternetAddresses" and pass it a "non-strict" address parameter. Because getRecipients just calls the other function under the hood. Will do some rewrites of the processor and see if the exception is ignored in the "non-strict" parsing of mail addresses. http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.1/javax/mail/internet/MimeMessage.java#MimeMessage.getHeaderAsInternetAddresses%28java.lang.String%2Cboolean%29 > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16147709#comment-16147709 ] Benjamin Wood commented on NIFI-4326: - Working on adding weak address validation. Address validation is currently strict, and any violating address will stop the rest of the headers from being extracted. Presumably this processor should handle the same messages that postfix or other mail servers would accept. > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Fix Version/s: 1.4.0 > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Priority: Minor > Fix For: 1.4.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood reassigned NIFI-4326: --- Assignee: Benjamin Wood > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Assignee: Benjamin Wood >Priority: Minor > Fix For: 1.4.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException > It's possible this is only an issue with Oracle Java. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Description: The ExtractEmailHeaders processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. If an address is empty (<> or " ") then getRecipients() will throw an "Empty Address" AddressException was: The ExtractEmailHeaders processor throws a NullPointerException if there is no TO, CC, and BCC recipients. If there are no recipients "originalMessage.getAllRecipients()" returns NULL, and not a 0 length array. If an address is empty (<> or " ") then getRecipients() will throw an "Empty Address" AddressException It's possible this is only an issue with Oracle Java. > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 >Reporter: Benjamin Wood >Assignee: Benjamin Wood >Priority: Minor > Fix For: 1.4.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Environment: jdk 1.8.0_121-b13 openjdk 8u131-b11 was:jdk 1.8.0_121-b13 > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 > openjdk 8u131-b11 >Reporter: Benjamin Wood >Assignee: Benjamin Wood >Priority: Minor > Fix For: 1.4.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (NIFI-4326) ExtractEmailHeaders.java unhandled Exceptions
[ https://issues.apache.org/jira/browse/NIFI-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Wood updated NIFI-4326: Status: Patch Available (was: In Progress) This is done. * Handles the Null Pointer Exception when parsing email addresses (lack of address will not cause the Processors to fail) * Adds the "Use Strict Address Parsing" Property to the ExtractEmailHeaders Processor to allow the user to tune the strictness of email address parsing * Relaxes the strict email address requirement on the ExtractEmailAttachments Processor (from email doesn't need to be valid and is not used in the internal logic of the Processor) * Adds unit tests for non-strict address parsing * Fixes GennerateAttachment.java to return the correct value Submitting this for review and merge. > ExtractEmailHeaders.java unhandled Exceptions > - > > Key: NIFI-4326 > URL: https://issues.apache.org/jira/browse/NIFI-4326 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.3.0 > Environment: jdk 1.8.0_121-b13 > openjdk 8u131-b11 >Reporter: Benjamin Wood >Assignee: Benjamin Wood >Priority: Minor > Fix For: 1.4.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The ExtractEmailHeaders processor throws a NullPointerException if there is > no TO, CC, and BCC recipients. > If there are no recipients "originalMessage.getAllRecipients()" returns NULL, > and not a 0 length array. > If an address is empty (<> or " ") then getRecipients() will throw an "Empty > Address" AddressException -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (NIFI-3423) List based processors don't support source directories with high file count.
[ https://issues.apache.org/jira/browse/NIFI-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16186596#comment-16186596 ] Benjamin Wood commented on NIFI-3423: - Looks like a potential fix would be to use {{java.nio.file.newDirectoryStream}} instead of {{java.io.File.listFiles}} listFiles is known to not handle large directories. DirectoryStream has a much smaller memory footprint and is a more efficient method. > List based processors don't support source directories with high file count. > > > Key: NIFI-3423 > URL: https://issues.apache.org/jira/browse/NIFI-3423 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework >Affects Versions: 1.1.1 >Reporter: Matthew Clarke > > NiFi FlowFile attributes/metadata lives in heap. The List based processors > return a complete listing from the target and then creates a FlowFile for > each File in that returned listing. The FlowFiles being created are not > committed to the list processor's success relationship until all have been > created. So you end up running out of NiFi JVM heap memory before that can > happen when the returned listing is very large. > It would be nice if the list based processors could commit batches (10,000) > of FlowFiles at a time from the returned listing instead of trying to commit > them all at once to help avoid heap exhaustion. -- This message was sent by Atlassian JIRA (v6.4.14#64029)