It sounds to be a deadlock: 

A deadlock scenario has been detected and avoided. This means that two ormore 
transactions
, which were holding locks, were wanting to await locks held by one 
another,which would have resulted 
in a deadlock between these transactions. This exception was thrown instead 
of ending up in that deadlock.


See the deadlock section in the Neo4j manual for how to avoid this: http:
//docs.neo4j.org/chunked/stable/transactions-deadlocks.html


Details: 'Transaction(98, 
owner:"play-akka.actor.default-dispatcher-6")[STATUS_ACTIVE,Resources=1] 
can't wait on resource RWLock[NodeLock[id=0]] since => Transaction(98, owner
:"play-akka.actor.default-dispatcher-6")[STATUS_ACTIVE,Resources=1] <-[:
HELD_BY]- RWLock[NodeLock[id=3]] <-[:WAITING_FOR]- Transaction(101, owner:
"play-akka.actor.default-dispatcher-9")[STATUS_ACTIVE,Resources=1] <-[:
HELD_BY]- RWLock[NodeLock[id=0]]'.
 at 
org.springframework.data.neo4j.support.Neo4jExceptionTranslator.translateExceptionIfPossible(Neo4jExceptionTranslator.java:67)
 at 
org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)
 at 
org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
 at 
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)
 at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
 at $Proxy57.save(Unknown Source)
 at 
com.myApp.infrastructure.persistence.user.Neo4jUserRepository.save(Neo4jUserRepository.scala:15)


On Friday, March 14, 2014 2:45:17 AM UTC+1, Michael Hunger wrote:
>
> How does it fail?
> D
> Am 14.03.2014 um 01:54 schrieb Michael Azerhad 
> <[email protected]<javascript:>
> >:
>
> Hi,
>
> I try to update the relationship of a Node that is a collection.
> Example: User has a list of Cars.
>
> Firstly, I saved the User with the Cars set beforehand, and the whole 
> works with embedded mode and REST mode.
>
> Now, I want to add one Car to the list of this User. 
>
> So I tried the following:  (Scala code but easy to figure out)
>
> val tx = graphDatabaseService.beginTx()
>           val user = userRepository.findById(1)
>           user.cars.clear()   //cars being the relationships (Set[Cars])
>           user.cars.add(new Car("Ferrari"))
>           userRepository.save(user)           // fail with embedded but 
> works with REST mode !
> tx.success()
>
>
> Is it the right way to update the collection ?
> Is there something special on the embedded mode handling ?
>
> Thanks,
>
> Michael
>
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to