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

ASF subversion and git services commented on NIFI-14561:
--------------------------------------------------------

Commit 1594dba1a5977e0d5322f780ab9bff8db2ff3a15 in nifi's branch 
refs/heads/main from Peter Turcsanyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1594dba1a5 ]

NIFI-14561 Fixed NPE in PublishAMQP due to wrong usage of Max Inbound Message 
Body Size property

Signed-off-by: Pierre Villard <[email protected]>

This closes #9936.


> PublishAMQP throws a NullPointerException
> -----------------------------------------
>
>                 Key: NIFI-14561
>                 URL: https://issues.apache.org/jira/browse/NIFI-14561
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 2.4.0
>            Reporter: Will James
>            Assignee: Peter Turcsanyi
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently in version 2.4.0 of NiFi, the PublishAQMP processor fails to 
> initialize with the following bulletin error.
> {code:java}
> Failed to initialize AMQP client: java.lang.NullPointerException: Cannot 
> invoke "java.lang.Double.intValue()" because the return value of 
> "org.apache.nifi.components.PropertyValue.asDataSize(org.apache.nifi.processor.DataUnit)"
>  is null {code}
> The flowFiles then remain unprocessed in the connection to this processor and 
> nothing is able to be processed.
> This appears to be the result of the NIFI-13738 changes. 
>  
> *CAUSE*
> After investigation into the changes between 2.3.0 and 2.4.0, the addition of 
> the Max Inbound Message Body Size property is the culprit. This property is 
> required in the ABSTRACT class, but it isn't being set within the PublishAMQP 
> class. I have tried setting this manually on the processor, however the 
> Validator stops this from happening. Even though it seems there is a default 
> initialized for this property it isn't being used within the context of 
> PublishAMQP.
> Link to the affected Property: 
> [https://github.com/hr-ireh/nifi/blob/26ef065ae7bf61e2ea660d09482b4d5cdf00515d/nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java#L142]
>  
> The issue might be due to it not being present in the List defined here as 
> well as it being listed as a Required Value. 
> [https://github.com/hr-ireh/nifi/blob/26ef065ae7bf61e2ea660d09482b4d5cdf00515d/nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java#L151]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to