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
Rising Star

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
Rising Star
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
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
Rising Star
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login