2

I tried running the Neo4j sample program JavaQuery.java. I used the neo4j maven script provided to get all the dependencies. However when I run it I get the following error:

Exception in thread "main" java.lang.UnsupportedOperationException: No query engine installed.
    at org.neo4j.kernel.impl.query.NoQueryEngine.noQueryEngine(NoQueryEngine.java:56)
    at org.neo4j.kernel.impl.query.NoQueryEngine.executeQuery(NoQueryEngine.java:33)
    at org.neo4j.kernel.InternalAbstractGraphDatabase.execute(InternalAbstractGraphDatabase.java:953)
    at org.neo4j.kernel.InternalAbstractGraphDatabase.execute(InternalAbstractGraphDatabase.java:944)
    at JavaQuery.JavaQuery.run(JavaQuery.java:60)
    at JavaQuery.JavaQuery.main(JavaQuery.java:44)

I haven't found any documentation about how to get the query engine installed.

the simple low level java interface seems to work, but I haven't been able to get Cypher queries to work.

How do I get past this issue?

Tamil Selvan C
  • 19,913
  • 12
  • 49
  • 70
tmk49
  • 21
  • 3

3 Answers3

3

You need neo4j cypher dependency.

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-cypher</artifactId>
    <version>2.2.0</version>
</dependency>
shazin
  • 21,379
  • 3
  • 54
  • 71
  • I put this, I get this error https://stackoverflow.com/questions/49722863/org-neo4j-kernel-graphdatabasequeryservice-no-dependecy-satisfies-interface – joe Apr 09 '18 at 08:56
3

The neo4j-cypher dependency that @shazin mentioned, should come along when you depend on:

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j</artifactId>
    <version>2.2.0</version>
</dependency>
Michael Hunger
  • 41,339
  • 3
  • 57
  • 80
  • 1
    Thank you for your answers, gentlemen. I'm using netbeans as my IDE. It does show the neo4j-cyper-2.2.0.jar in the dependencies list with a location of /home/tmk49/.m2/repository/org/neo4j/neo4j-cypher/2.2.0/neo4j-cypher-2.2.0.jar. Are there other places that I might look? Thank you. – tmk49 Apr 12 '15 at 15:10
  • I put this, I get this error https://stackoverflow.com/questions/49722863/org-neo4j-kernel-graphdatabasequeryservice-no-dependecy-satisfies-interface – joe Apr 09 '18 at 08:56
0

I had a similar issue and I had the dependency org.neo4j:neo4j:* configured. Here are some ideas.

Cause #1 : Dependency shadowing

It could be one of your dependencies conflicting with transitive dependency from neo4j. Putting neo4j higher in your SBT could solve this issue. (This was what worked for me)

Cause #2 : Maximum command line reach (Windows only)

Neo4j has tons of jars. It could be the java command that is too long for windows' maximum number of characters. See: How to set a long Java classpath in Windows?

h3xStream
  • 6,293
  • 2
  • 47
  • 57