Giter Site home page Giter Site logo

Comments (6)

rekon avatar rekon commented on May 19, 2024 1

Hi, I am using Gremlin Server hosting Neo4j. Since Neo4j doesn't require ids to be explicitly specified by its nodes(or vertices) therefore when I run the example I get the following error -

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application': Invocation of init method
failed; nested exception is com.microsoft.spring.data.gremlin.exception.GremlinQueryException: unable to complete query from gremlin; nested exception is java.util.concurrent.ExecutionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Vertex does not support user supplied identifiers

And when I use @GeneratedValue with @ Id in Person & Relation class, and don't pass id in constructor of Person class, I get the following error -

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application': Invocation of init method failed; nested exception is com.microsoft.spring.data.gremlin.exception.GremlinInvalidEntityIdFieldException: The vertex id for the from vertex cannot be null!

Please help

from spring-data-gremlin.

fabiencoppens avatar fabiencoppens commented on May 19, 2024

It looks like JanusGraph 0.3.0 has an option to let users supply ids as longs, but it is not recommended, based on their documentation. It is a config setting that has to be configured when the backing datastore is initialized, and cannot be changed afterward. The config flag is graph.set-vertex-id
See here: https://docs.janusgraph.org/latest/config-ref.html#_graph.
The doc says: "Whether user provided vertex ids should be enabled and JanusGraph’s automatic id allocation be disabled. Useful when operating JanusGraph in concert with another storage system that assigns long ids but disables some of JanusGraph’s advanced features which can lead to inconsistent data. EXPERT FEATURE - USE WITH GREAT CARE."

Also, user provided ids are supported only for vertices, not for edges.

I agree though that it would be better to rely on JanusGraph's internally generated ids.

from spring-data-gremlin.

fabiencoppens avatar fabiencoppens commented on May 19, 2024

@Incarnation-p-lee I pushed a PR to make ids optional PR #155

from spring-data-gremlin.

nefkor avatar nefkor commented on May 19, 2024

Hi, is this feature not available yet?

from spring-data-gremlin.

Tin-Nguyen avatar Tin-Nguyen commented on May 19, 2024

hi @rekon , did you fix your issue yet? I get the same issue as yours and looking for a solution to fix it now. Could you please let me know the solution to fix the issue if you did. Thanks

from spring-data-gremlin.

chenrujun avatar chenrujun commented on May 19, 2024

Closing this issue.
Because it's not active for a long time.
If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues

from spring-data-gremlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.