cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Problem with graph algorithms/jaccard similarity

Hi all,

When calculating jaccard similarity using:
RETURN algo.similarity.jaccard([1,2,3], [1,2,4,5]) AS similarity
I received the following error:

Neo.ClientError.Statement.SyntaxError
Unknown function 'algo.similarity.jaccard' (line 1, column 8 (offset: 7))
"RETURN algo.similarity.jaccard([1,2,3], [1,2,4,5]) AS similarity"
^

I then verified that i have graph algorithm installed and ran
CALL algo.list()
which gave me this error:

Neo.ClientError.Procedure.ProcedureNotFound
There is no procedure with the name algo.list registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.

I tried various solutions, including restarting the desktop client, and the solution suggested here (Problem installing graph algoritms) which is to add the following to "settings":

dbms.security.procedures.unrestricted=apoc.*, algo.*
dbms.security.procedures.whitelist=apoc.*, algo.*

However, none of them worked. Anyone has any suggestions how to proceed?

Thanks a lot!

1 ACCEPTED SOLUTION

It looks like you're using Neo4j 4.0, which is not compatible with graph algorithms.

If you downgrade your database to 3.5.X, you'll be able to download the algos plugin via desktop.

View solution in original post

14 REPLIES 14

did you place the graph algorithms jar file in the plugins folder?

I tried downloading the jar file from here: https://github.com/neo4j-contrib/neo4j-graph-algorithms/releases and putting it into the plugins folder, but now the graph server won't start and gives me this error:

hi elaine, could you please share the complete error log. open the logs window when you start the server . you can see the error there.
or see the logs/neo4j.log file

here's the complete error log for the session:

Directories in use:
  home:         /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0
  config:       /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/conf
  logs:         /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/logs
  plugins:      /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/plugins
  import:       NOT SET
  data:         /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/data
  certificates: /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/certificates
  run:          /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/run
Starting Neo4j.
2020-02-13 07:23:06.088+0000 INFO  ======== Neo4j 4.0.0 ========
2020-02-13 07:23:06.097+0000 INFO  Starting...
2020-02-13 07:23:17.429+0000 INFO  Called db.clearQueryCaches(): Query cache already empty.
2020-02-13 07:23:34.095+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@49d42faf' was successfully initialized, but failed to start. Please see the attached cause exception "Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@49d42faf' was successfully initialized, but failed to start. Please see the attached cause exception "Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@49d42faf' was successfully initialized, but failed to start. Please see the attached cause exception "Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?".
	at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:163)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
	at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@49d42faf' was successfully initialized, but failed to start. Please see the attached cause exception "Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:156)
	... 3 more
Caused by: java.lang.RuntimeException: Error starting database server at /Users/elaine/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-f2804e32-e073-4bc4-84bb-994e20341e2c/installation-4.0.0/data/databases
	at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:167)
	at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
	at com.neo4j.server.database.EnterpriseGraphFactory.newDatabaseManagementService(EnterpriseGraphFactory.java:38)
	at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
	... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.procedure.impl.GlobalProceduresRegistry@59f93db8' was successfully initialized, but failed to start. Please see the attached cause exception "Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
	... 9 more
Caused by: org.neo4j.internal.kernel.api.exceptions.ProcedureException: Argument `nodeIds` at position 0 in `list` with
type `List` cannot be converted to a Neo4j type: Default value `` could not be parsed as a LIST? OF INTEGER?
	at org.neo4j.procedure.impl.MethodSignatureCompiler.signatureFor(MethodSignatureCompiler.java:115)
	at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:251)
	at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:225)
	at org.neo4j.procedure.impl.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:114)
	at org.neo4j.procedure.impl.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:85)
	at org.neo4j.procedure.impl.GlobalProceduresRegistry.start(GlobalProceduresRegistry.java:342)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
	... 11 more
2020-02-13 07:23:34.096+0000 INFO  Neo4j Server shutdown initiated by request

You need to install the graph algorithms library. To check what you have installed, you can use CALL dbms.procedures() to list out the procedures that are available.

For installation instructions, check out https://neo4j.com/docs/graph-algorithms/current/introduction/#_installation

Hi Alice. Thanks a lot for the reply. I tried to install the graph algorithms library but there doesn't seem to be an "install" button next to it on the plugins page (unlike what is shown in the installation guide):

Is there something I'm missing?

the error says that there is some procedure using incompatible data type .
Do you have any other jars in plugins folder ?
And were you able to start the neo4j without graph algorithms jar ?

I also have the apoc jar in the same folder (apoc-4.0.0.2.jar).

The graph server is able to start without the graph algorithm jar.

It looks like you're using Neo4j 4.0, which is not compatible with graph algorithms.

If you downgrade your database to 3.5.X, you'll be able to download the algos plugin via desktop.

Thanks Alicia, that solved it!

Please can you show me the link of neo4j version 3.5 because i just found neo4j version 4.0 ?

You can find both versions on our download center page: https://neo4j.com/download-center/

Alicia - Thank you for this very clear statement which is completely missing from anyplace in release notes, implementation instructions, the Migrating to 4.0 notes or really anyplace except here. Thank you also to Google Search for making it possible to stop beating my head against the monitor trying to reconcile this statement from the release notes:

Compatibility Warning: Graph algorithms 3.5.14.0 is only compatible with Neo4j 3.5.9 and above.

Though we now know (again, thank you) that this is false 4.0 does technically meet the definition of "above" 3.5.9 - yes?

When can we expect to see 4.x compatible GAs? Or is the technical direction to eliminate GAs in favor of GDS somehow and if so, then same question.

Please see the compatibility matrix in our documentation: https://neo4j.com/docs/graph-data-science/current/installation/#_supported_neo4j_versions , or the compatibility section at the bottom of our release notes: https://neo4j.com/graph-data-science-1-0-0-release-notes/

Look for a 4.0 compatible release of GDS at the end of the month -- we're currently targeting April 23 for a preview release of a 4.0 compatible binary, GA in early May.

The Graph Algorithms library has been deprecated and will no longer be updated, now that the graph data science library has been launched. There will not be a 4.0 compatible release of the Graph Algorithms library.