orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.73k stars 871 forks source link

Usage of Lightweight Edges and Regular Edges #7791

Closed ghost closed 3 years ago

ghost commented 7 years ago

OrientDB Version: 2.2.22

Java Version: 1.8.0_144

OS: Windows

I have existing databases with lightweight edges. At some point I switched to regular edges. So it seems I have existing lightweight edges...

The database works in the application but when I open the Orient Graph Editor I receive the following exception when i select one of the vertices in the editor and a lot of edges are missing.

$ANSI{green {db=database}} Exception `51818281` in storage `database`
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.SELECT out('Characteristic').size() as `out_Characteristic`,in('Product').size() as `in_Product` from #97:117
    DB name="database"
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3229)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3146)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
    at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:106)
    at com.orientechnologies.orient.graph.server.command.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:37)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:169)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:621)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Caused by: java.lang.IllegalArgumentException: Type error. The class Characteristic does not extend class 'E' and therefore cannot be considered an Edge
    at com.tinkerpop.blueprints.impls.orient.OrientEdgeType.checkType(OrientEdgeType.java:44)
    at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getEdgeType(OrientBaseGraph.java:1388)
    at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getEdgeClassNames(OrientBaseGraph.java:314)
    at com.tinkerpop.blueprints.impls.orient.OrientVertex.getVertices(OrientVertex.java:399)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionMove.v2v(OSQLFunctionMove.java:103)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionOut.move(OSQLFunctionOut.java:54)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionMove$1$2.call(OSQLFunctionMove.java:87)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionMove$1$2.call(OSQLFunctionMove.java:84)
    at com.orientechnologies.orient.core.sql.OSQLEngine.foreachRecord(OSQLEngine.java:294)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionMove$1.call(OSQLFunctionMove.java:84)
    at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runWithAnyGraph(OGraphCommandExecutorSQLFactory.java:210)
    at com.orientechnologies.orient.graph.sql.functions.OSQLFunctionMove.execute(OSQLFunctionMove.java:69)
    at com.orientechnologies.orient.core.sql.functions.OSQLFunctionRuntime.execute(OSQLFunctionRuntime.java:128)
    at com.orientechnologies.orient.core.sql.ORuntimeResult.applyRecord(ORuntimeResult.java:141)
    at com.orientechnologies.orient.core.sql.ORuntimeResult.getProjectionResult(ORuntimeResult.java:255)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.addResult(OCommandExecutorSQLSelect.java:725)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.handleResult(OCommandExecutorSQLSelect.java:674)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearchRecord(OCommandExecutorSQLSelect.java:630)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.serialIterator(OCommandExecutorSQLSelect.java:1637)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.fetchFromTarget(OCommandExecutorSQLSelect.java:1584)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:525)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:488)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3208)
    ... 7 more

Is there a recommended migration procedure that I missed to perform?

wolf4ood commented 7 years ago

Hi @loers

there is not migration procedure. lightweight are automatically if necessary.

This seems related Graph editor that does not handle well lightweight

ghost commented 6 years ago

Okay thats good. So it's a bug with the graph editor? Its pretty inconvinient not to be able to check the graph in the editor. Can this be a version problem? I used the current version of the graph editor.