|spring-data-neo4j REST timeout||Pamod len||8/23/12 1:00 AM|
In my project,I use spring-data-neo4j to connect the neo4j server.
but when i use the java api method "template.getGraphDatabaseService().getAllNodes()",
I see error message like this:
this is my applicationContext.xml:
this is my java:
please help me. Thanks.
|Re: [Neo4j] spring-data-neo4j REST timeout||Lasse Westh-Nielsen||8/23/12 1:21 AM|
Can you try breaking down your problem.
1) separate reading from database from writing to file - does that work?
2) can you do even simple operations on the database, i.e. something not involving reading all nodes - i.e. testing your setup and config is in order
|Re: [Neo4j] spring-data-neo4j REST timeout||Michael Hunger||8/23/12 1:27 AM|
Why don't you use <neo4j:config> as the configuration namespace but wire everything up yourself?
Why do you want to get all nodes?
It would be much better use a cypher statement
Iterable<Node> nodes = template.query("start n=node(*) return n").to(Node.class)
How many nodes are in your graph?
In the last java-rest-binding milestone (1.8.RC1) you can configure the connect and read-timeouts, see the readme:
So if you change your dependency to that (and probably exclude it in spring-data-neo4j-rest)
_timeouts in seconds_
Am 23.08.2012 um 10:00 schrieb Pamod len:
|Pamod len||8/23/12 1:28 AM||<This message has been deleted.>|
|Re: [Neo4j] spring-data-neo4j REST timeout||Pamod len||8/23/12 1:31 AM|
thanks for your reply.
If my java like this,use neo4j java api GraphDatabaseService
It works normally.
|Pamod len||8/23/12 1:36 AM||<This message has been deleted.>|
|Re: [Neo4j] spring-data-neo4j REST timeout||Michael Hunger||8/23/12 1:39 AM|
Yes, but there is a big difference between a local in-process database and a remote database where all data has to be transported across the wire.
Am 23.08.2012 um 10:31 schrieb Pamod len:
|Re: [Neo4j] spring-data-neo4j REST timeout||Pamod len||8/23/12 1:41 AM|
It works normally when i use class org.neo4j.graphdb.GraphDatabaseService.
Michael glad see you again,
do you remember my database index is lost.
so I must get all nodes for rebuild my index.
but my database version is 1.6.1 cant support node(*)
|Re: [Neo4j] spring-data-neo4j REST timeout||Pamod len||8/23/12 1:47 AM|
I do this only used to do a test, my real database can only connect with rest interface.
|Re: [Neo4j] spring-data-neo4j REST timeout||Michael Hunger||8/23/12 1:52 AM|
Unfortunately this doesn't help you.
As the rest-graph-db uses cypher under the hood and the older versions don't support this method.
Why can't you just get the data/graph.db directory from the server and rebuild the index on that directory using an EmbeddedGraphDB ?
Otherwise you have to do it manually.
Get the #of nodes in your db from web-admin (first dashboard)
and in a for-loop do restGraphDB.getNodeById(id) and ignore those that have not been found.
Am 23.08.2012 um 10:41 schrieb Pamod len:
|Re: [Neo4j] spring-data-neo4j REST timeout||Pamod len||8/23/12 2:15 AM|
That is a nother way.
but I'm wondering, is there no way to let it not timeout?
在 2012年8月23日星期四UTC+8下午4时52分25秒，Michael Hunger写道：
|Re: [Neo4j] spring-data-neo4j REST timeout||Michael Hunger||8/23/12 2:22 AM|
The default timeout is configured to 30 sec. which is more than enough in most cases. Which should also be fine for the manual approach described in the last email.
After all in your case it might even be that it is not a blocking timeout but rather an error occurring on the server side.
Your server is 1.6.1 ? What is the SDN/java-rest-binding version that you are using?
Am 23.08.2012 um 11:15 schrieb Pamod len:
|Re: [Neo4j] spring-data-neo4j REST timeout||Pamod len||8/23/12 2:54 AM|
yes, my server is 1.6.1. but my project neo4j jar is 1.8.M06.
i cant know how to found the java-rest-binding version.
but i have spring-data-neo4j-rest-2.1.0.BUILD-SNAPSHOT.jar.
You mean the problem in version differences?
I will trying to change same version.
在 2012年8月23日星期四UTC+8下午5时22分04秒，Michael Hunger写道：