graphaware / neo4j-reco

Neo4j-based recommendation engine module with real-time and pre-computed recommendations.
374 stars 77 forks source link

Neo4j startup fails after adding recommendation plugin #37

Closed shubham-pathak22 closed 6 years ago

shubham-pathak22 commented 6 years ago

I have download neo4j 3.3.0 Community Edition and have written a recommendation engine. I am getting following exception when starting neo4j server with graphaware neo4j-reco plugin.

2017-11-20 00:37:35.648+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7b3cd28b' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to register procedure, because the name dbms.functions is already in use.". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7b3cd28b' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to register procedure, because the name dbms.functions is already in use.". org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7b3cd28b' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to register procedure, because the name dbms.functions is already in use.". at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:218) at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111) at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79) at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32) Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7b3cd28b' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to register procedure, because the name dbms.functions is already in use.". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:210) ... 3 more Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /Users/shubham/Neo4j/neo4j-community-3.3.0/data/databases/graph.db at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211) at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:126) at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:58) at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:88) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445) ... 5 more Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@507d4512' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to register procedure, because the name dbms.functions is already in use.". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:207) ... 9 more Caused by: org.neo4j.kernel.api.exceptions.ProcedureException: Unable to register procedure, because the name dbms.functions is already in use. at org.neo4j.kernel.impl.proc.ProcedureRegistry.register(ProcedureRegistry.java:84) at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:123) at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:78) at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:278) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445) ... 11 more 2017-11-20 00:37:35.649+0000 INFO Neo4j Server shutdown initiated by request

I am unable to find the root cause of the exception as it says "Unable to register procedure, because the name dbms.functions is already in use" but I have not registered any procedures in my program.

Plugins directory looks like this shubhams-MacBook-Pro:neo4j-community-3.3.0 shubham$ ls plugins/ recommender-1.0-jar-with-dependencies.jar graphaware-server-community-all-3.3.0.51.jar graphaware-reco-3.3.0.51.11.jar

Added following line in neo4j.conf dbms.unmanaged_extension_classes=com.recommender.controller=/recommendation

miromarchi commented 6 years ago

Hi @shubham-pathak22 One thing I notice is that you are missing the proper graphaware framework configuration in you conf/neo4j file. You should have this line dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware.

Also, you can use this skeleton project to get started with a working recommendation engine. I just tried it again and it is working.

You can maybe hack starting from that skeleton. I close this for now, since it's working with the proper conf but let me know how it end up for you, thanks.