Closed jzelez closed 11 years ago
what is the tests output in /target/surefire-reports/org.neo4j.community.console.QueryStatisticsTest.txt?
-------------------------------------------------------------------------------
Test set: org.neo4j.community.console.QueryStatisticsTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.115 sec <<< FAILURE!
testNoUpdate(org.neo4j.community.console.QueryStatisticsTest) Time elapsed: 0.03 sec <<< FAILURE!
java.lang.AssertionError: time
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.neo4j.community.console.QueryStatisticsTest.testNoUpdate(QueryStatisticsTest.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
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.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
you could to start with just build without tests,
mvn clean install -DskipTests
On Tue, Jan 8, 2013 at 6:03 PM, Jurica Zeleznjak notifications@github.comwrote:
Test set: org.neo4j.community.console.QueryStatisticsTest
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.115 sec <<< FAILURE! testNoUpdate(org.neo4j.community.console.QueryStatisticsTest) Time elapsed: 0.03 sec <<< FAILURE! java.lang.AssertionError: time at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.assertTrue(Assert.java:43) at org.neo4j.community.console.QueryStatisticsTest.testNoUpdate(QueryStatisticsTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) 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.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
— Reply to this email directly or view it on GitHubhttps://github.com/neo4j-contrib/rabbithole/issues/46#issuecomment-12006111.
Now when I try to run I get this:
$ java org.neo4j.community.console.Console
Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/community/console/Console
Caused by: java.lang.ClassNotFoundException: org.neo4j.community.console.Console
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)
Use this to start it:
mvn compile exec:java
With this - it works! Thanks.
First it downloaded a bunch of new files, and then it started up.
I've also now tried with mvn compile install exec:java
and it also went without a hitch.
Obviously the newly downloaded files fixed something. :)
Indeed!
Now, rock some contributions in :)
On Wed, Jan 9, 2013 at 8:14 AM, Jurica Zeleznjak notifications@github.comwrote:
With this - it works! Thanks.
First it downloaded a bunch of new files, and then it started up. I've also now tried with mvn compile install exec:java and it also went without a hitch.
Obviously the newly downloaded files fixed something. :)
— Reply to this email directly or view it on GitHubhttps://github.com/neo4j-contrib/rabbithole/issues/46#issuecomment-12034059.
Hi, i had the same exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/community/console/Console
as you said, i started with
mvn compile exec:javaand worked like a charm, but then how do i load my own db with out the
org.neo4j.community.console.Console port path-to-local-dbparam?
thanks!
As stated in the readme:
java org.neo4j.community.console.Console port /path/to/db [expose]
or with maven use -Dexec.args="port /path/to/db [expose]"
See http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html
Thanks for the quick response! i could not run
java org.neo4j.community.console.Console port /path/to/db [expose]because it throwed the exception, but with
-Dexec.args="port /path/to/db [expose]"it worked!, it loaded my data base... but now i cant run any cypher querys because it keeps throwing me the exception
Error: org.neo4j.cypher.MissingIndexException: Index `node_auto_index` does not exist
i dont have node_auto_index configured in my data base, but i have my own indexes that i dont see in the Initial graph setup, am i missing something?
thanks in advance!
The console defaults to use the auto-index and it configures it itself. Usually that is solved at the second query, can you share the stacktrace?
Hi, thank you for answering!, here is the stack trace
2013-03-20 13:16:22,062 WARN - Route - query: START n=node:persona(name = 'Luis Harif Perez Meza') MATCH n-[:COMMITED]->()<-[]->fof RETURN n, fof org.neo4j.cypher.MissingIndexException: Index `node_auto_index` does not exist at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$.checkNodeIndex(IndexQueryBuilder.scala:11 1) at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$.getNodeGetter(IndexQueryBuilder.scala:72) at org.neo4j.cypher.internal.executionplan.builders.TraversalMatcherBuilder.identifier2nodeFn(TraversalMatcherBu ilder.scala:87) at org.neo4j.cypher.internal.executionplan.builders.TraversalMatcherBuilder.apply(TraversalMatcherBuilder.scala: 40) at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.prepareExecutionPlan(ExecutionPlanImpl.scala:54) at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.(ExecutionPlanImpl.scala:36) at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:80) at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:80) at org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:37) at org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:80) at org.neo4j.cypher.ExecutionEngine.profile(ExecutionEngine.scala:56) at org.neo4j.cypher.ExecutionEngine.profile(ExecutionEngine.scala:63) at org.neo4j.cypher.javacompat.ExecutionEngine.profile(ExecutionEngine.java:95) at org.neo4j.community.console.CypherQueryExecutor.cypherQuery(CypherQueryExecutor.java:170) at org.neo4j.community.console.CypherQueryExecutor.cypherQuery(CypherQueryExecutor.java:158) at org.neo4j.community.console.Neo4jService.cypherQuery(Neo4jService.java:97) at org.neo4j.community.console.ConsoleApplication$8.doHandle(ConsoleApplication.java:104) at org.neo4j.community.console.Route.handle(Route.java:37) at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:135) at spark.servlet.SparkFilter.doFilter(SparkFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) at org.neo4j.community.console.GuardingRequestFilter.doFilter(GuardingRequestFilter.java:59) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:474) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:935) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:404) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:870) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:346) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1051) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:592) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:520) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528) at java.lang.Thread.run(Thread.java:619) 2013-03-20 13:16:22,125 DEBUG - MatcherFilter - halt performed 2013-03-20 13:36:31,390 WARN - Neo4jService - Shutting down service org.neo4j.community.console.Neo4jServ ice@6d23ea 2013-03-20 13:36:31,390 WARN - SessionHoldingListener - Session destroyed: org.eclipse.jetty.server.session.HashSes sionManager$HashedSession:1kqa71oils6xb1eicqxue0cbak@17066472 sessions 0
the thing is i dont want node_auto_index, i have my own indexes in my db, as you see in the executed query i tried to acces one of them:
START n=node:persona(name = 'Luis Harif Perez Meza') MATCH n-[:COMMITED]->()<-[]->fof RETURN n, fof
i share with you the Initial graph setup generated when i run the console accesing my own db, i dont see my indexes there either, dont know if they shold be there
start _0 = node(0) with _0 create (_1 {job:"CEO JWM Solutions S.C.",name:"Oscar Ramon Meza Fernandez"}), (_2 {job:"Lider Tecnico",name:"Luis Harif Perez Meza"}), (_3 {job:"Esposa de emprendedor",name:"Lizbeth Reyna Felix"}), (_4 {job:"Desarrollador web",name:"Daniela Gonzalez"}), (_5 {job:"Consultor Fast",name:"Felix Cortez"}), (_6 {job:"Fisico Teorico",name:"Sheldon Lee Cooper"}), (_7 {desc:"Corsa, 2005, gris"}), (_8 {desc:"Lancer, 2008, plata"}), (_9 {desc:"Aston Martin, 2009, gris"}), (_10 {desc:"Bocho, 1992, verde"}), (_11 {num:"8262634633"}), (_12 {num:"8262637427"}), (_13 {num:"5563802577"}), (_14 {desc:"Robo 12,300 pesos a banco en Lampazos de Naranjo, Nuevo Leon"}), _0-[:KNOWS {relationship-type:"knows",source:0,target:1}]->_1, _0-[:WORKS_FOR {relationship-type:"works for",source:0,target:1}]->_1, _0-[:OWNS {relationship-type:"owns",source:0,target:11}]->_11, _0-[:OWNS {relationship-type:"owns",source:0,target:7}]->_7, _1-[:KNOWS {relationship-type:"knows",source:1,target:2}]->_2, _1-[:KNOWS {relationship-type:"is married to",source:1,target:3}]->_3, _1-[:OWNS {relationship-type:"owns",source:1,target:9}]->_9, _1-[:OWNS {relationship-type:"owns",source:1,target:13}]->_13, _2-[:KNOWS {relationship-type:"knows",source:2,target:0}]->_0, _2-[:KNOWS {relationship-type:"knows",source:2,target:3}]->_3, _2-[:WORKS_FOR {relationship-type:"works for",source:2,target:1}]->_1, _2-[:OWNS {relationship-type:"owns",source:2,target:8}]->_8, _2-[:OWNS {relationship-type:"owns",source:2,target:12}]->_12, _2-[:COMMITED {relationship-type:"commited",source:2,target:14}]->_14, _3-[:KNOWS {relationship-type:"knows",source:3,target:0}]->_0, _3-[:OWNS {relationship-type:"owns",source:3,target:9}]->_9, _3-[:OWNS {relationship-type:"owns",source:3,target:13}]->_13, _4-[:COMMITED {relationship-type:"commited",source:4,target:14}]->_14, _5-[:COMMITED {relationship-type:"commited",source:5,target:14}]->_14, _6-[:OWNS {relationship-type:"owns",source:6,target:10}]->_10, _10-[:WAS_USED_TO {relationship-type:"was used to commit",source:10,target:14}]->_14
thanks in advance!!
The console doesn't care for real indexes, as you cannot create them with cypher. There is one configuration that substitutes index names for the auto-index. I can make that optional.
Did you look into just using neo4j-shell for your purposes?
Download a server and use bin/neo4j-shell -path /path/to/your/graph.db
Hello, yes, i tried neo4j-shell, my query works there but i cant see the graph.... i like this console because i can see the actual graph, not just the nodes, and thats just what i want, your console is a great tool.
it's ok if i dont have my indexes in the db, what can i do to make it work with node_auto_index then? i tried making a query like this:
START n=node:node_auto_index(name = 'Luis Harif Perez Meza') MATCH n-[:COMMITED]->()fof RETURN n, fof
but this didnt work either, i know the nodes are there, becasue when i search for all nodes i can see the graph.
so in short, what do i need to make it work with node_auto_index? i can throw my indexes away :)
thank you!!
I pushed a version to github which doesn't do the index magic, please try that one.
The auto-index for the console is automatically created and populated. So you would have to configure the auto-index for your db in the db-config: http://docs.neo4j.org/chunked/milestone/auto-indexing.html#auto-indexing-config
Hi, i configured node_auto_index in my db, and it works in my neo4j installation, i can do queries like:
START n=node:node_auto_index(name = 'Luis Harif Perez Meza') MATCH n-[:COMMITED]->()<-[:COMMITED]->fof RETURN n, fof
i updated the class you modified from git, CypherQueryExecutor.java and re-run the console with:
mvn compile exec:java -Dexec.args="8080 C:\neo4j-community-1.9.M05\data\graph.db [expose]"
the data base is loaded, but i still cant make a query with node_auto_index like the one i just stated
did i miss something?
thanks and sorry!
Use expose without the square brackets then it exposes your db and its indexes
mvn compile exec:java -Dexec.args="8080 C:\neo4j-community-1.9.M05\data\graph.db expose"
worked perfectly!! great! thank you!!
please help me to solve this problem
[INFO] [INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ edi_to_java --- [WARNING] java.lang.ClassNotFoundException: src.test.java.org.smooksam.edi_to_java.AppTest .java at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281) at java.lang.Thread.run(Thread.java:745) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.158 s [INFO] Finished at: 2016-03-10T16:29:41+05:30 [INFO] Final Memory: 9M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (d efault-cli) on project edi_to_java: An exception occured while executing the Jav a class. src.test.java.org.smooksam.edi_to_java.AppTest.java -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception
C:\Users\102878\workspace\edi_to_java>
Hi. I'm having trouble building from source. Can you help ?