java.lang.IllegalStateException: Unable to delete relationship[3521] since it is already deleted.

GitHub | ryancollingwood | 3 months ago
  1. 0

    Duplicate Relationships on creation of a related node

    GitHub | 3 months ago | ryancollingwood
    java.lang.IllegalStateException: Unable to delete relationship[3521] since it is already deleted.
  2. 0

    py2neo error on write batch py2neo.neo4j.BatchOperationFailedException

    Stack Overflow | 3 years ago | skme
    java.lang.IllegalStateException: Unable to delete relationship[259221] since it is already deleted.
  3. 0

    The implementation of _CRUDRepository.deleteAll()_ employs _EntityRemover.removeNode()_, which deletes all relationships regardless of direction. Thus, each relationship is deleted from the start and the end node, which is invalid and throws (sample below). {code} Exception in thread "main" java.lang.IllegalStateException: Unable to delete relationship[255491] since it is already deleted. at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.relDelete(WriteTransaction.java:668) at org.neo4j.kernel.impl.persistence.PersistenceManager.relDelete(PersistenceManager.java:171) at org.neo4j.kernel.impl.core.NodeManager.deleteRelationship(NodeManager.java:1102) at org.neo4j.kernel.impl.core.RelationshipImpl.delete(RelationshipImpl.java:138) at org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:62) at org.springframework.data.neo4j.support.DelegatingGraphDatabase.remove(DelegatingGraphDatabase.java:253) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeRelationship(EntityRemover.java:64) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNode(EntityRemover.java:51) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNodeEntity(EntityRemover.java:45) at org.springframework.data.neo4j.support.mapping.EntityRemover.remove(EntityRemover.java:85) at org.springframework.data.neo4j.support.Neo4jTemplate.delete(Neo4jTemplate.java:222) at org.springframework.data.neo4j.repository.AbstractGraphRepository.delete(AbstractGraphRepository.java:328) at org.springframework.data.neo4j.repository.AbstractGraphRepository.delete(AbstractGraphRepository.java:339) at org.springframework.data.neo4j.repository.AbstractGraphRepository.deleteAll(AbstractGraphRepository.java:345) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy34.deleteAll(Unknown Source) {code}

    Spring JIRA | 3 years ago | Johannes Mockenhaupt
    java.lang.IllegalStateException: Unable to delete relationship[255491] since it is already deleted.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The implementation of _CRUDRepository.deleteAll()_ employs _EntityRemover.removeNode()_, which deletes all relationships regardless of direction. Thus, each relationship is deleted from the start and the end node, which is invalid and throws (sample below). {code} Exception in thread "main" java.lang.IllegalStateException: Unable to delete relationship[255491] since it is already deleted. at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.relDelete(WriteTransaction.java:668) at org.neo4j.kernel.impl.persistence.PersistenceManager.relDelete(PersistenceManager.java:171) at org.neo4j.kernel.impl.core.NodeManager.deleteRelationship(NodeManager.java:1102) at org.neo4j.kernel.impl.core.RelationshipImpl.delete(RelationshipImpl.java:138) at org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:62) at org.springframework.data.neo4j.support.DelegatingGraphDatabase.remove(DelegatingGraphDatabase.java:253) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeRelationship(EntityRemover.java:64) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNode(EntityRemover.java:51) at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNodeEntity(EntityRemover.java:45) at org.springframework.data.neo4j.support.mapping.EntityRemover.remove(EntityRemover.java:85) at org.springframework.data.neo4j.support.Neo4jTemplate.delete(Neo4jTemplate.java:222) at org.springframework.data.neo4j.repository.AbstractGraphRepository.delete(AbstractGraphRepository.java:328) at org.springframework.data.neo4j.repository.AbstractGraphRepository.delete(AbstractGraphRepository.java:339) at org.springframework.data.neo4j.repository.AbstractGraphRepository.deleteAll(AbstractGraphRepository.java:345) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy34.deleteAll(Unknown Source) {code}

    Spring JIRA | 3 years ago | Johannes Mockenhaupt
    java.lang.IllegalStateException: Unable to delete relationship[255491] since it is already deleted.
  6. 0

    GitHub comment 16#6832006

    GitHub | 4 years ago | ceefour
    java.lang.IllegalStateException: Unable to delete relationship[16] since it is already deleted.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Unable to delete relationship[3521] since it is already deleted.

      at org.neo4j.kernel.impl.core.RelationshipProxy.delete()
    2. Neo4j - Graph Database Kernel
      RelationshipProxy.delete
      1. org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:163)
      1 frame
    3. org.structr.neo4j
      RelationshipWrapper.delete
      1. org.structr.neo4j.wrapper.RelationshipWrapper.delete(RelationshipWrapper.java:152)
      1 frame
    4. org.structr.core
      AbstractNode.setProperty
      1. org.structr.core.graph.DeleteRelationshipCommand.execute(DeleteRelationshipCommand.java:85)
      2. org.structr.core.graph.DeleteRelationshipCommand.execute(DeleteRelationshipCommand.java:56)
      3. org.structr.core.app.StructrApp.delete(StructrApp.java:153)
      4. org.structr.core.entity.ManyStartpoint.set(ManyStartpoint.java:113)
      5. org.structr.core.property.StartNodes.setProperty(StartNodes.java:177)
      6. org.structr.core.property.StartNodes.setProperty(StartNodes.java:55)
      7. org.structr.core.entity.AbstractNode.setPropertyInternal(AbstractNode.java:1442)
      8. org.structr.core.entity.AbstractNode.setProperty(AbstractNode.java:1403)
      8 frames
    5. structr-rest
      JsonRestServlet.doPut
      1. org.structr.rest.resource.Resource.doPut(Resource.java:165)
      2. org.structr.rest.servlet.JsonRestServlet.doPut(JsonRestServlet.java:606)
      2 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      2 frames
    7. Jetty
      ServletHandler$CachedChain.doFilter
      1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
      2. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      3. org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
      4. org.eclipse.jetty.servlets.AsyncGzipFilter.doFilter(AsyncGzipFilter.java:408)
      5. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      5 frames
    8. UrlRewriteFilter
      UrlRewriteFilter.doFilter
      1. org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      2. org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      3. org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      4. org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
      4 frames
    9. Jetty
      QueuedThreadPool$3.run
      1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      3. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      4. org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      5. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      6. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      7. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      8. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      9. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      10. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      11. org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      12. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      13. org.eclipse.jetty.server.Server.handle(Server.java:497)
      14. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
      15. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      16. org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      17. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      18. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      18 frames
    10. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame