OSql ステートメントを含むファイルをプログラムでロードして、Blueprint API を使用して DB のスキーマを作成しています。具体的には、クラスplocal
をインスタンス化することにより、モードで DB を作成しています。OrientGraphNoTx
val graph = new OrientGraphNoTx(s"plocal:$dbPath", "admin", "admin")
クラスV
がデータベースに存在しないという奇妙なエラーが表示されます。
Exception in thread "main" com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #29: Super-class V; not exists
Command: CREATE CLASS Employee EXTENDS V;
エラーを生成するサンプル コードを次に示します。
def main(args: Array[String]) {
val graph = new OrientGraphNoTx(s"plocal:C:\\Users\\alberto\\tmp\\tmp\\test_orient", "admin", "admin")
val cmd = "CREATE CLASS Employee EXTENDS V;"
graph.command(new OCommandSQL(cmd)).execute()
graph.shutdown(true)
}
他のほとんどの人が同様の問題を抱えていて、ステートメントにキーワードgraph
を指定して解決したことがわかったので、 . とにかくスクリプトにステートメントを追加しようとしましたが、予想どおりエラーが発生しました。CREATE DATABASE
OrientGraphNoTx
CREATE DATABASE
Exception in thread "main" com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.CREATE DATABASE plocal:C:\Users\alberto\tmp\tmp\synth_1000 admin admin plocal graph
lib
OrientDB 2.1.4のディレクトリに含まれる jar を使用しています。
この問題を解決する方法を知っている人はいますか?