[ 
https://issues.apache.org/jira/browse/NIFI-14561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Turcsanyi updated NIFI-14561:
-----------------------------------
    Status: Patch Available  (was: Open)

> 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: 10m
>  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