Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: missing class name (`org.neo4j.graphdb.factory.GraphDatabaseFactory') #337

Open
l7x opened this issue Jan 15, 2020 · 2 comments

Comments

@l7x
Copy link

l7x commented Jan 15, 2020

I'm getting this error with basic embedded example:

NameError: missing class name (`org.neo4j.graphdb.factory.GraphDatabaseFactory')
from org/jruby/javasupport/JavaPackage.java:124:in `const_missing'

I followed the documentation, but I'm not sure if I need to install anything else manually or everything should be already bundled.

Code example:

require 'neo4j/core/cypher_session/adaptors/embedded'
neo4j_adaptor = Neo4j::Core::CypherSession::Adaptors::Embedded.new('/tmp/graph.db')
neo4j_session = Neo4j::Core::CypherSession.new(neo4j_adaptor)

Runtime information:

jruby 9.2.9.0 on linux
Neo4j database version: embedded
neo4j gem version: neo4j-9.6.1.gem
neo4j-core gem version: neo4j-core-9.0.0

@klobuczek
Copy link
Member

klobuczek commented Jan 15, 2020

@l7x since you are running embedded you must be including neo4j jar files. There is the neo4j-community gem, but it is hopelessly outdated. If you must run in embedded mode you are on your own and must find a way to add the entire set of neo4j server jar files to your ruby project. Have a look at jar-dependencies and ruby-maven gems. Let me know if you succeed.
Otherwise run in server mode as nearly everyone does nowadays.

@l7x
Copy link
Author

l7x commented Jan 15, 2020

Thank you for the quick response. Documentation (and wiki) on embedded mode is very confusing.
Unfortunately, I can't run server mode due to some requirements.

I'll check ruby-maven and jar-dependencies. If I get this working, are there any additional problems I can expect with neo4jrb and embedded mode in the long run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants