I got this very wired exception, please help
java.lang.NoClassDefFoundError: org/neo4j/graphdb/index/ReadOnlyIndex
at
org.neo4j.cypher.ExecutionEngine.createSourcePumps(ExecutionEngine.scala:82)
at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:36)
at
org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:51)
at com.expressed.cypher.CypherTest.exampleQuery(CypherTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.ClassNotFoundException:
org.neo4j.graphdb.index.ReadOnlyIndex
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
and this is the code I used to run.
private CypherParser parser;
private GraphDatabaseService db;
private ExecutionEngine engine;
@Before
public void setUp() throws Exception {
parser = new CypherParser();
db = DatabaseHelper.getInstance().getDatabaseService(); // To get my
database
engine = new ExecutionEngine(db);
}
@Test
public void exampleQuery() throws Exception {
Query query = parser.parse("start n=(7) match (n)-[:OWN]->(x) return
x");
ExecutionResult result = engine.execute(query);
// System.out.println(result.toString());
// assertThat(result.toString(), containsString("Toy"));
}
--
View this message in context:
http://neo4j-user-list.438527.n3.nabble.com/Neo4j-1-4M05-Cypher-exception-tp3129791p3129791.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user