neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
637 stars 161 forks source link

Open GDS v2.7.0+68 ClassNotFoundException org.neo4j.gds.shaded.com.github.benmanes.caffeine.cache.Ticker #316

Closed JohT closed 4 months ago

JohT commented 5 months ago

Describe the bug

I get the following error message when trying to create a Graph Projection with an Open GDS package of the newest (experimental) tag v2.7.0+68:

Dependencies_3_Create_Projection.cypher: {
  "code": "Neo.ClientError.Procedure.ProcedureCallFailed",
  "message": "Failed to invoke procedure `gds.graph.project`: Caused by: java.lang.ClassNotFoundException: org.neo4j.gds.shaded.com.github.benmanes.caffeine.cache.Ticker"
}

Here is the corresponding Cypher statement:

CALL gds.graph.project('artifact-centrality', 'Artifact', 'DEPENDS_ON', {
    relationshipProperties: ['weight'],
    nodeProperties: ['incomingDependencies', 'outgoingDependencies']
}) YIELD graphName, nodeCount, relationshipCount
RETURN graphName, nodeCount, relationshipCount

With Open GDS 2.7.0-alpha03 everything works fine.

To Reproduce

Steps to reproduce the behavior

Alternative steps to reproduce the behavior

Expected behavior

Open GDS packaging should contain all libraries needed. I presume that it would be beneficial to define all dependencies in Gradle when they are imported somewhere in the repository directly. Open GDS 2.7.0-alpha03 as a reference works fine.

Additional context

With commit Use caches instead of hash maps (df4ebed) the package com.github.benmanes.caffeine.cache had been added to EphemeralResultStore.java. I couldn't find that library as a direct dependency in any Gradle configuration (see https://github.com/ben-manes/caffeine?tab=readme-ov-file#download). I guess it needs to be configured somewhere to be able to be picked up by open-packaging. I guess this issue would also happen with tag 2.7.0+65 since it also contains the mentioned changes.

vnickolov commented 5 months ago

Hi @JohT,

Thank you for reporting this! The +XYZ suffix is used for GDS for internal testing and should not be used as user deployment.. Please use the stable 2.6.x release of the library or the -alphaXY if you absolutely must have the latest GDS.

I hope this helps. Kind Regards, Ves

JohT commented 5 months ago

Hi @vnickolov, I'm aware of that. Nonetheless do I want to report that as early as possible so that there is more time to resolve it. Additionally, it is specific to the Open GDS package, not the "normal" package with Neo4j proprietary code.

vnickolov commented 5 months ago

Thank you @JohT,

We will discuss this with the team.

JohT commented 5 months ago

Thank you too @vnickolov.

Mats-SX commented 5 months ago

@JohT We will stop syncing these tags. They do not indicate OpenGDS release commits, but are used for Neo4j-internal purposes.

We will look into the reported issue with OpenGDS however.

JohT commented 5 months ago

Hey @Mats-SX, thanks very much for your effort.

Don't worry too much about those extra tags. I'm absolutely aware that they shouldn't be used, that they are ever more experimental than alpha and beta tags and in fact I even needed to loosen Renovate versioning to get them 🤯. So this is more on me hacking my way into the newest things fully knowing that they are not stable. I'm just playing around with it. I'm pretty sure no one else would do that especially not for production code.

So if those tags help you to be more efficient in any kind feel free to leave them as is. If, on the other hand, you don't create them any more I'm also completely fine with that.

We will look into the reported issue with OpenGDS however.

Great. 👍 Thank you.

knutwalker commented 4 months ago

@JohT we merged a commit yesterday that adds the missing dependency, then OpenGDS build should now work again on the master branch.