You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ahsan (Jira)" <ji...@apache.org> on 2022/11/09 14:06:00 UTC

[jira] [Created] (NIFI-10787) Cannot commit flows to nifi registry

Ahsan created NIFI-10787:
----------------------------

             Summary: Cannot commit flows to nifi registry
                 Key: NIFI-10787
                 URL: https://issues.apache.org/jira/browse/NIFI-10787
             Project: Apache NiFi
          Issue Type: Bug
          Components: Flow Versioning
    Affects Versions: 1.18.0
            Reporter: Ahsan
         Attachments: stacktrace_nifi.txt, stacktrace_nifi_registry.txt

Hi,

 

So we recently updated to Nifi 1.18.0 and registry to 1.18.0.

Some portions of our flows were for no reason "Commitable" any more. Attached are the stacktraces from nifi and nifi-registry, when we click the commit local changes button in nifi.

 

Thinking this is a problem on our end, we debugged the issue and found out the following:

The method below is where things trip and we get a NPE.
{code:java}
private String getRegistryUrl(final FlowRegistryClientNode registry) {
    return registry.getComponentType().equals("org.apache.nifi.registry.flow.NifiRegistryFlowRegistryClient") ? registry.getRawPropertyValue(registry.getPropertyDescriptor("URL")) : "";
} {code}
If you note the call "registry.getPropertyDescriptor("URL")" with the hard-coded string "URL", this is failing although the property is there BUT with the name in small case "url".

I say this is because if we look at the class {color:#6a8759}"NifiRegistryFlowRegistryClient", {color}the url property is described as following:
{code:java}
public final static PropertyDescriptor PROPERTY_URL = new PropertyDescriptor.Builder()
        .name("url")
        .displayName("URL")
        .description("URL of the NiFi Registry")
        .addValidator(StandardValidators.URL_VALIDATOR)
        .required(true)
        .build();{code}
And if you note the property name is described with small case "url". Hence PropertyDescriptor which bases its hash on the "name" property fails when we search with uppercase "URL".

Hope I have helped here. Can someone fix this issue. We cannot commit in our registry currently because of the NPE.

 

Regards

 

 

 

 



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