Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi registry 'getFlowPersistenceProvider' threw exception; nested exception is java.lang.NullPointerException

avatar
Contributor

Hi there,

Maybe some one can help us out. Searching on the web for similar error's doesn't give us a lead on what is going on.

Let me sketch out what is happening. Last week we were cleaning up some old buckets with flows from the nifi-registry manually thru the web gui. At some point we received an error that pointed us the registry logs. Actually didn't see anything there. To test if everything is still working, we tried to commit a change to a versioned flow. Which failed. Unfortunately I don't have the error anymore. So decided to restart the registry hoping that this will help. And now it has gotten worse, the registry isn't starting anymore and is showing the error below.

2024-03-26 09:40:28,551 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getFlowPersistenceProvider' defined in class path resource [org/apache/nifi/registry/provider/StandardProviderFactory.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.nifi.registry.flow.FlowPersistenceProvider]: Factory method 'getFlowPersistenceProvider' threw exception; nested exception is java.lang.NullPointerException

What is this error trying to tell us? This is our provider config:
<flowPersistenceProvider>

<class>org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider</class>

<property name="Flow Storage Directory">./flow_storage</property>

<property name="Remote To Push">origin</property> <property name="Remote Access User"></property>

<property name="Remote Access Password"></property>

</flowPersistenceProvider>

Any help would be much appreciated.

Thank you in advanced.

Kind regards,

Dave

1 ACCEPTED SOLUTION

avatar
Contributor

 hi @hegde , thank you for your fast reply. This would have worked indeed. Fortunately, we found the culprit on our matter. Someone made manual changes to the nifi github repo which was used by the nifi-registry. 

We reverted the changes in github and now the registry seems to work again 🙂 

View solution in original post

2 REPLIES 2

avatar
Master Collaborator

As you have already integrated with Git using GitFlowPersistenceProvider, you should have all your latest flows in git.
So you can create a new directory on your nifi registry machine and clone the git branch inside the new directory and point nifi reg to that new directory.

(Take a backup of metadata db (H2/MySQL/Postgres) before doing this)

avatar
Contributor

 hi @hegde , thank you for your fast reply. This would have worked indeed. Fortunately, we found the culprit on our matter. Someone made manual changes to the nifi github repo which was used by the nifi-registry. 

We reverted the changes in github and now the registry seems to work again 🙂