OrientDB "Cannot find a command executor for the command request" 错误
OrientDB "Cannot find a command executor for the command request" error
我最初将其作为错误发布在 OrientDB issue tracker 上。但是,我不太确定这是一个错误...
基本上,当我 运行 来自 IDE 的项目时,一切都很好,所有查询都顺利执行。但是,当我使用 maven-shade-plugin
打包项目时,我开始收到这些 Cannot find a command executor for the command request:
错误,但仅针对一部分查询。在我的 pom.xml
中,我声明如下:
<!-- As defined: http://orientdb.com/docs/last/Graph-Database-Tinkerpop.html -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>${orientdb-version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-graphdb</artifactId>
<version>${orientdb-version}</version>
</dependency>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
<artifactId>concurrentlinkedhashmap-lru</artifactId>
<version>1.4.2</version>
</dependency>
<!-- Include to enable embedded db if user selects single mode -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-server</artifactId>
<version>${orientdb-version}</version>
</dependency>
<!-- Include to enable remote db if user selects distributed mode -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-client</artifactId>
<version>${orientdb-version}</version>
</dependency>
...
<orientdb-version>2.1.3</orientdb-version>
我已将以下过滤器添加到阴影插件以尝试确保没有任何内容被删除,但它似乎没有解决问题:
<filters>
<filter>
<artifact>*:*</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
堆栈跟踪:
Caused by: com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.CREATE EDGE hasRole FROM (SELECT FROM Person WHERE @rid=#15:0) TO (SELECT FROM Role WHERE @rid=#16:1)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:72) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:42) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1431) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63) ~[halo-1.0.0.jar:1.0.0]
at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49) ~[halo-1.0.0.jar:1.0.0]
at co.ff36.halo.core.persistence.Dao.exec(Dao.java:94) ~[halo-1.0.0.jar:1.0.0]
at co.ff36.halo.core.resource.server.UserRoleServerResource.store(UserRoleServerResource.java:63) ~[halo-1.0.0.jar:1.0.0]
... 57 common frames omitted
问题是 maven-shade-plugin 默认不能合并服务文件。 OrientDB 使用 Java 服务以相同的接口注入命令。我想如果你在构建时看到一些日志,你会看到 shade 插件跳过了一些文件,因为它们已经存在。
我想你可以通过添加一些合并策略来解决它
我最初将其作为错误发布在 OrientDB issue tracker 上。但是,我不太确定这是一个错误...
基本上,当我 运行 来自 IDE 的项目时,一切都很好,所有查询都顺利执行。但是,当我使用 maven-shade-plugin
打包项目时,我开始收到这些 Cannot find a command executor for the command request:
错误,但仅针对一部分查询。在我的 pom.xml
中,我声明如下:
<!-- As defined: http://orientdb.com/docs/last/Graph-Database-Tinkerpop.html -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>${orientdb-version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-graphdb</artifactId>
<version>${orientdb-version}</version>
</dependency>
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
<artifactId>concurrentlinkedhashmap-lru</artifactId>
<version>1.4.2</version>
</dependency>
<!-- Include to enable embedded db if user selects single mode -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-server</artifactId>
<version>${orientdb-version}</version>
</dependency>
<!-- Include to enable remote db if user selects distributed mode -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-client</artifactId>
<version>${orientdb-version}</version>
</dependency>
...
<orientdb-version>2.1.3</orientdb-version>
我已将以下过滤器添加到阴影插件以尝试确保没有任何内容被删除,但它似乎没有解决问题:
<filters>
<filter>
<artifact>*:*</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
堆栈跟踪:
Caused by: com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.CREATE EDGE hasRole FROM (SELECT FROM Person WHERE @rid=#15:0) TO (SELECT FROM Role WHERE @rid=#16:1)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:72) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:42) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1431) ~[halo-1.0.0.jar:1.0.0]
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63) ~[halo-1.0.0.jar:1.0.0]
at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49) ~[halo-1.0.0.jar:1.0.0]
at co.ff36.halo.core.persistence.Dao.exec(Dao.java:94) ~[halo-1.0.0.jar:1.0.0]
at co.ff36.halo.core.resource.server.UserRoleServerResource.store(UserRoleServerResource.java:63) ~[halo-1.0.0.jar:1.0.0]
... 57 common frames omitted
问题是 maven-shade-plugin 默认不能合并服务文件。 OrientDB 使用 Java 服务以相同的接口注入命令。我想如果你在构建时看到一些日志,你会看到 shade 插件跳过了一些文件,因为它们已经存在。 我想你可以通过添加一些合并策略来解决它