Re: [Neo4j] Groovy and Unable to lock store..this is usually a result of..

2011-04-15 Thread Mattias Persson
Have you just upgraded to neo4j 1.3? In that case you need to
explicitly say that neo4j can upgrade your store, otherwise an
exception (wrapped in a TransactionFailureException) will be thrown at
startup. It would be helpful with the full stacktrace though, it
always is.

If it indeed is an exception regarding upgrade (take a look at the
nested exception if it says about allowing the upgrade of your store)
then see documentation on how to upgrade here:
http://docs.neo4j.org/chunked/stable/deployment-upgrading.html and
more specifically
http://docs.neo4j.org/chunked/stable/deployment-upgrading.html#_special_upgrade

hopefully that helps!

2011/4/15 mindthief mindthi...@gmail.com:
 Hi All,
 Just trying to get started with Neo4j, and I am seeing the issues reported
 above. Initially I was getting the IllegalStateException: Unable to lock
 store message, and now I'm getting the other message
 TransactionFailureException: Could not create data source. The code
 correctly created the db the first time I ran it -- these errors are
 happening on subsequent runs. There is only one application, so no
 possibility of another being open and accessing the db. I am using Groovy
 and Blueprints.

 Any advice would be appreciated, thanks!
 -M


 --
 View this message in context: 
 http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Groovy-and-Unable-to-lock-store-this-is-usually-a-result-of-tp1567247p2822672.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Groovy and Unable to lock store..this is usually a result of..

2011-04-14 Thread mindthief
Hi All,
Just trying to get started with Neo4j, and I am seeing the issues reported
above. Initially I was getting the IllegalStateException: Unable to lock
store message, and now I'm getting the other message
TransactionFailureException: Could not create data source. The code
correctly created the db the first time I ran it -- these errors are
happening on subsequent runs. There is only one application, so no
possibility of another being open and accessing the db. I am using Groovy
and Blueprints.

Any advice would be appreciated, thanks!
-M


--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Groovy-and-Unable-to-lock-store-this-is-usually-a-result-of-tp1567247p2822672.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] Groovy and Unable to lock store..this is usually a result of..

2011-04-14 Thread Michael Hunger
Hi,

Perhaps you're not shutting down the db after usage and have some other process 
(or visualization like neoclipse in non-ro mode) running at the same datastore?

But as this seems to be blueprints related you should perhaps cross-post this 
question on the tinkerpop/gremlin mailing list.

Cheers

Michael

Am 15.04.2011 um 00:57 schrieb mindthief:

 Hi All,
 Just trying to get started with Neo4j, and I am seeing the issues reported
 above. Initially I was getting the IllegalStateException: Unable to lock
 store message, and now I'm getting the other message
 TransactionFailureException: Could not create data source. The code
 correctly created the db the first time I ran it -- these errors are
 happening on subsequent runs. There is only one application, so no
 possibility of another being open and accessing the db. I am using Groovy
 and Blueprints.
 
 Any advice would be appreciated, thanks!
 -M
 
 
 --
 View this message in context: 
 http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Groovy-and-Unable-to-lock-store-this-is-usually-a-result-of-tp1567247p2822672.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] Groovy and Unable to lock store..this is usually a result of..

2010-09-24 Thread Tobias Ivarsson
Hi Andrew,

Did you get a chance to see the solution posted by Andres?
http://lists.neo4j.org/pipermail/user/2010-September/005046.html
Check out the patched code in the gist he linked to in that email:
http://gist.github.com/594707

The problem with the example you were running was that the finally-block
contained failing code. This prevented the entire finally-block from
completing, more specifically it prevented shutdown from being invoked.

GroovyConsole will keep running even after a script it's executing has
failed. Combined with the fact that the scripts that GroovyConsole executes
run in the same JVM as GroovyConsole itself (and thus all scripts run in the
same JVM), this means that the Neo4j kernel instance from the first
execution (that was not shut down due to failure) will still be around when
you try to start the second execution.

The problem in the original code was that if you omitted the tx.success()
call the transaction would roll back. This would mean that the nodes created
in the try-block no longer exist. When the code in the finally-block tries
to operate on the references to those nodes it will fail since these nodes
don't exist. The exception thrown by this failure will prevent the execution
of the next statement, the call to shutdown. Thus rendering the problem you
have experienced.

Andres has nicely fixed this problem in his updated version of your script
by having the shutdown invocation in its own, outer, finally-block. This
ensures that shutdown is always invoked, regardless of how the script
terminates.

Cheers,
Tobias

On Fri, Sep 24, 2010 at 3:16 AM, Andrew Grealy iag...@yahoo.com wrote:

 Hi Mattias,

 I think it needs looking into to, it's a Bug.

 I tested the same application in a pure java application - no problem
 whatsoever.

 I do the code in groovy script, make a bug and Whamcannot access my
 graph after it crashes out.

 The groovy script would not keep the JVM up. I change the graph to a new
 name and things work again.

 It is a lock that when groovy crashes out, you cannot get into your graph
 again.

 Once again, doing the same code in java and crashing it, I see a recovery
 message, and it comes up nicely.

 Groovy isn't doing this recovery.

 I would like to use Groovy as I think it's going to be a nice fit for
 writing graph code.  Peter also has he same problem using gremlin.

 cheers,
 ag

 The cause of this problem (for the OverlappingFileLockException) is that
  there's another Neo4j kernel instance already running withing the same
 JVM
  for that particular store. I also improved the exception to say that.

 2010/9/23 Andrew Grealy iaglyw at yahoo.com

  Hi All,
 
  I have been on the learning path for Neo4J. I came across a problem
 people
  are experiencing.
 
  If you write groovy scripts to learn how to use Noe4j, then if they bomb
  out you are left with the 'unable to lock store problem'.
 
  I was playing with groovy code from:
  http://groovyconsole.appspot.com/script/245001
  (To reproduce the problem just make a bug, such as comment out the
  tx.success() line then re-run again)
 
  I then tried doing the same thing in Java, to confirm Neo4J isn't flakey.
  Neo4J was rock solid.  This may explain why all the people answering guys
  messages on this problem says it because you have two applications
 accessing
  the system. (Which I can tell you only had one groovy script running at a
  time.)
 
  I would like to make a suggestion have a special startup mode, that can
  clear the state on startup. (Getting to work again, was painful).  In
  development this would be useful, it would be an over-ride and not normal
  operation
 
  cheers,
  Andrew
 
 
 
  ___
  Neo4j mailing list
  User at lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Tobias Ivarsson tobias.ivars...@neotechnology.com
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Groovy and Unable to lock store..this is usually a result of..

2010-09-23 Thread Mattias Persson
The cause of this problem (for the OverlappingFileLockException) is that
there's another Neo4j kernel instance already running withing the same JVM
for that particular store. I also improved the exception to say that.

2010/9/23 Andrew Grealy iag...@yahoo.com

 Hi All,

 I have been on the learning path for Neo4J. I came across a problem people
 are experiencing.

 If you write groovy scripts to learn how to use Noe4j, then if they bomb
 out you are left with the 'unable to lock store problem'.

 I was playing with groovy code from:
 http://groovyconsole.appspot.com/script/245001
 (To reproduce the problem just make a bug, such as comment out the
 tx.success() line then re-run again)

 I then tried doing the same thing in Java, to confirm Neo4J isn't flakey.
 Neo4J was rock solid.  This may explain why all the people answering guys
 messages on this problem says it because you have two applications accessing
 the system. (Which I can tell you only had one groovy script running at a
 time.)

 I would like to make a suggestion have a special startup mode, that can
 clear the state on startup. (Getting to work again, was painful).  In
 development this would be useful, it would be an over-ride and not normal
 operation

 cheers,
 Andrew



 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user