orientdb: Cannot delete Edge because of missing in Vertex - java exceptions

OrientDB Version: 2.2.26

Java Version: 1.8.0_144

OS: Ubuntu 16.04.3 LTS

Expected behavior

Edge should be deleted.

Actual behavior

Cannot delete Edge because of missing out Vertex. Throwing java exceptions. Cannot use studio graph editor. Is there any way to recreate specific rid? Or to any other way how to “force” delete edge? I still have class where Vertex was created, but when I create new it got #15:1 instead of #15:0 which I’am missing.

Somehow I’am missing out Vertex on of my edges. Probably Vertex record was deleted in studio but my application through API has created Edge. When I try to delete edge record from E class in studio, nothing happens. When i try load graph in studio it show this error:

java.lang.ClassCastException: java.lang.String cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable

In OrientDB log I can see this:

$ANSI{green {db=nodetestdb}} Exception `7A2C9DB7` in storage `nodetestdb`
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.DELETE EDGE #12:5
        DB name="nodetestdb"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3234)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3151)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
        at com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteDocument.execute(OServerCommandDeleteDocument.java:79)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:173)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:625)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable
        at com.tinkerpop.blueprints.impls.orient.OrientEdge.getOutVertex(OrientEdge.java:188)
        at com.tinkerpop.blueprints.impls.orient.OrientGraph.removeEdgeInternal(OrientGraph.java:392)
        at com.tinkerpop.blueprints.impls.orient.OrientEdge.remove(OrientEdge.java:382)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteEdge$1.call(OCommandExecutorSQLDeleteEdge.java:211)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInTx(OGraphCommandExecutorSQLFactory.java:172)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInConfiguredTxMode(OGraphCommandExecutorSQLFactory.java:257)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteEdge.execute(OCommandExecutorSQLDeleteEdge.java:205)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3213)
        ... 6 more
$ANSI{green {db=nodetestdb}} Exception `7A2C9DB7` in storage `nodetestdb`
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.DELETE EDGE #12:5
        DB name="nodetestdb"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3234)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3151)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
        at com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteDocument.execute(OServerCommandDeleteDocument.java:79)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:173)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:625)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable
        at com.tinkerpop.blueprints.impls.orient.OrientEdge.getOutVertex(OrientEdge.java:188)
        at com.tinkerpop.blueprints.impls.orient.OrientGraph.removeEdgeInternal(OrientGraph.java:392)
        at com.tinkerpop.blueprints.impls.orient.OrientEdge.remove(OrientEdge.java:382)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteEdge$1.call(OCommandExecutorSQLDeleteEdge.java:211)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInTx(OGraphCommandExecutorSQLFactory.java:172)
        at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInConfiguredTxMode(OGraphCommandExecutorSQLFactory.java:257)
        at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteEdge.execute(OCommandExecutorSQLDeleteEdge.java:205)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3213)
        ... 6 more


About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

Yes, it works. Great, thank you very much.