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

Joseph Witt updated NIFI-2879:
------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> Adding Provenance Repo Causes NPE
> ---------------------------------
>
>                 Key: NIFI-2879
>                 URL: https://issues.apache.org/jira/browse/NIFI-2879
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: NiFi 1.0.0 with Ambari Version 2.4.1.0 on centos 7
>            Reporter: Josh Meyer
>            Assignee: Oleg Zhurakousky
>             Fix For: 1.1.0
>
>
> After adding an additional provenance repository to nifi.properties NiFi 
> fails to restart because of a NPE. I added the following property to the 
> 'Custom nifi-properties' section of NiFi's Ambari component: 
> nifi.provenance.repository.directory.provenance1=/data11/nifi/provenance_repository
> The following stack trace was taken from nifi-app.log:
> {code}
> org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
>         at 
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:93)
>  ~[na:na]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:837)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:533)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:810)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:345)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
>  ~[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520) 
> ~[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.eclipse.jetty.server.Server.start(Server.java:411) 
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
>  ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.eclipse.jetty.server.Server.doStart(Server.java:378) 
> ~[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at 
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>  ~[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
>         at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:651) 
> ~[nifi-jetty-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at org.apache.nifi.NiFi.<init>(NiFi.java:152) 
> [nifi-runtime-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at org.apache.nifi.NiFi.main(NiFi.java:243) 
> [nifi-runtime-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
> Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'flowService': FactoryBean threw exception on object 
> creation; nested exception is org.spring
> framework.beans.factory.BeanCreationException: Error creating bean with name 
> 'flowController': FactoryBean threw exception on object creation; nested 
> exception is java.lang.RuntimeException:
> Unable to create Provenance Repository
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)
>  ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:52)
>  ~[na:na]
>         ... 23 common frames omitted
> Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'flowController': FactoryBean threw exception on 
> object creation; nested exception is java.lang.RuntimeException: Unable to 
> create Provenance Repository
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1585)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:317)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)
>  ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         at 
> org.apache.nifi.spring.StandardFlowServiceFactoryBean.getObject(StandardFlowServiceFactoryBean.java:48)
>  ~[nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         ... 29 common frames omitted
> Caused by: java.lang.RuntimeException: Unable to create Provenance Repository
>         at 
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:459) 
> ~[nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at 
> org.apache.nifi.controller.FlowController.createClusteredInstance(FlowController.java:403)
>  ~[nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at 
> org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:61)
>  ~[nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
>  ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
>         ... 36 common frames omitted
> Caused by: java.lang.NullPointerException: null
>         at 
> org.apache.nifi.provenance.PersistentProvenanceRepository.recover(PersistentProvenanceRepository.java:581)
>  ~[na:na]
>         at 
> org.apache.nifi.provenance.PersistentProvenanceRepository.initialize(PersistentProvenanceRepository.java:261)
>  ~[na:na]
>         at 
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:457) 
> ~[nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579]
>         ... 39 common frames omitted
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to