我一直在尝试使用 OrientDB 提供的“工作室”将 gremlin 与 OrientDB (V 3.0.30) 一起使用,但每次我尝试运行 gremlin 查询,例如 g.V
我收到错误:com.orientechnologies.orient.core.exception.OSecurityException: Language 'gremlin' is not allowed to be executed DB name="demodb"
.
我正在使用全新的安装(在 Windows 上)并且我确实有一个随 tp3 一起提供的版本。
我尝试创建新数据库,每次将它们设置为图形数据库,并尝试将 gremlin 添加到 orientdb-server-config.xlm
作为服务器端脚本解释器允许的语言,但没有任何改变。
我应该更改哪些设置以允许从这个“工作室”执行 gremlin 代码?
先感谢您。
最佳答案
这是 3.0.28 的发行说明
重要提示:在此版本中,出于安全原因,默认情况下禁用远程脚本(除了 SQL,当然默认情况下仍然启用)。这会影响执行如下
db.execute("gremlin", "");
要重新启用远程脚本,您必须编辑 orientdb-server-config.xml,将您需要的脚本语言添加到 OServerSideScriptInterpreter:
<handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
<parameters>
<parameter value="true" name="enabled"/>
<parameter value="SQL,GREMLIN" name="allowedLanguages"/>
</parameters>
</handler>
发布说明链接:
https://github.com/orientechnologies/orientdb/wiki/OrientDB-3.0-Release-Notes#3028---5-february-2020
关于orientdb - 无法在 OrientDB Studio 中使用 gremlin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61065396/