Re: [Neo4j] What to do with Unable to lock store?
Can you please check that? use jps or ps -aux | grep java to look for other java processes. Could you please also provide the content of your graph.db/messages.log ? It might be that somehow the grails plugin is started twice by grails leading to this scenario. Cheers Michael Am 10.07.2011 um 01:17 schrieb noppanit: Hi! Actually, it occurs when I deploy to Amazon EC2, which I don't have multiple neo4j instances running. BTW, how can I check if there are multiple neo4j instances? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3155728.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] What to do with Unable to lock store?
Thanks for the reply, I'm not using Grails plugin, I'm using native embedded neo4j. I'm redesigning my application just to make sure that I close the database after use. BTW, if I got that error again, would that mean that the database is corrupted? Is there anyway to restore it? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3157185.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] What to do with Unable to lock store?
Hi, This error usually means you have another process trying to new EmbeddedGraphDatabaseService() to the same directory. The only way to have multiple threads talk to the same database is by passing a reference to the database to all threads that want it. e.g. new Thread() { x = new EmbeddedGraphDatabaseService(/tmp/graph); }.run(); new Thread() { y = new EmbeddedGraphDatabaseService(/tmp/graph); }.run(); ** BAD ** x = new EmbeddedGraphDatabaseService(/tmp/graph); new Thread() { x }.run(); new Thread() { x }.run(); ** GOOD ** Hope that helps, Marko. http://markorodriguez.com On Jul 10, 2011, at 12:41 PM, noppanit wrote: Thanks for the reply, I'm not using Grails plugin, I'm using native embedded neo4j. I'm redesigning my application just to make sure that I close the database after use. BTW, if I got that error again, would that mean that the database is corrupted? Is there anyway to restore it? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3157185.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] What to do with Unable to lock store?
no it is not corrupted it is just a second instance accessing the same store either from the same jvm or another how and where do you start your embeddedgraphdb? and if you don't shutdown the db cleanly it will have to recover at the next start Michael mobile mail please excuse brevity and typos Am 10.07.2011 um 20:41 schrieb noppanit noppani...@gmail.com: Thanks for the reply, I'm not using Grails plugin, I'm using native embedded neo4j. I'm redesigning my application just to make sure that I close the database after use. BTW, if I got that error again, would that mean that the database is corrupted? Is there anyway to restore it? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3157185.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] What to do with Unable to lock store?
How do you instantiate the GraphDatabase? Via resources.groovy? If so, make sure to set a destroyMethod. graphDatabaseService(EmbeddedGraphDatabase, 'my/path') { bean - bean.destroyMethod = shutdown } Next thing to check if Grails reloading causes the error. You might increase logging levels to track this down. Another idea: place a breakpoint on your EmbeddedGraphDatabase's constructor and analyze the stacktrace when it's called for the 2nd time. Regards, Stefan Am Sonntag, den 10.07.2011, 11:41 -0700 schrieb noppanit: Thanks for the reply, I'm not using Grails plugin, I'm using native embedded neo4j. I'm redesigning my application just to make sure that I close the database after use. BTW, if I got that error again, would that mean that the database is corrupted? Is there anyway to restore it? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3157185.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] What to do with Unable to lock store?
If I got this error what should I do with it, does it mean that the database is corrupted? java.lang.IllegalStateException: Unable to lock store [web-app/WEB-INF/resources/db/neostore], this is usually caused by another Neo4j kernel already running in this JVM for this particular store -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3155717.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] What to do with Unable to lock store?
Hi! Actually, it occurs when I deploy to Amazon EC2, which I don't have multiple neo4j instances running. BTW, how can I check if there are multiple neo4j instances? -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/What-to-do-with-Unable-to-lock-store-tp3155717p3155728.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user