n10s.graphconfig.init running on server startup with an already existing DB.
On fc-server restart it is trying to initialize a new n10s.graphconfig even if it already exists. This causes a permanent restart of the container and the following logs:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.driver.Driver]: Factory method 'driver' threw exception; nested exception is org.neo4j.driver.exceptions.ClientException: Failed to invoke procedure `n10s.graphconfig.init`: Caused by: n10s.graphconfig.GraphConfigProcedures$GraphConfigException: The graph is non-empty. Config cannot be changed.
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 69 common frames omitted
Caused by: org.neo4j.driver.exceptions.ClientException: Failed to invoke procedure `n10s.graphconfig.init`: Caused by: n10s.graphconfig.GraphConfigProcedures$GraphConfigException: The graph is non-empty. Config cannot be changed.
at org.neo4j.driver.internal.util.Futures.blockingGet(Futures.java:144)
at org.neo4j.driver.internal.InternalSession.run(InternalSession.java:69)
at org.neo4j.driver.internal.InternalSession.run(InternalSession.java:51)
at org.neo4j.driver.internal.AbstractQueryRunner.run(AbstractQueryRunner.java:37)
at org.neo4j.driver.internal.AbstractQueryRunner.run(AbstractQueryRunner.java:55)
at eu.gaiax.difs.fc.core.config.GraphDbConfig.driver(GraphDbConfig.java:42)
at eu.gaiax.difs.fc.core.config.GraphDbConfig$$EnhancerBySpringCGLIB$$cdfae645.CGLIB$driver$0(<generated>)
at eu.gaiax.difs.fc.core.config.GraphDbConfig$$EnhancerBySpringCGLIB$$cdfae645$$FastClassBySpringCGLIB$$173a2011.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at eu.gaiax.difs.fc.core.config.GraphDbConfig$$EnhancerBySpringCGLIB$$cdfae645.driver(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
Edited by Cristina Pauna