OrientDB在上下文错误中找不到数据库实例?

编程入门 行业动态 更新时间:2024-10-25 23:36:41
本文介绍了OrientDB在上下文错误中找不到数据库实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Orient DB在orientdb-community-1.7-rc2

Orient DB has and issue in orientdb-community-1.7-rc2

中有问题

var db = orient.getDatabase() return 'test';

并执行它我得到以下错误

and executes it I get following erro

解析位置#0处的脚本时出错:执行脚本时出错脚本:newPOJS ------ ^ sun.mozilla.javascript.internal.WrappedException: Wrapped com.orientechnologies.orient.core.exception.OConfigurationException:在第2行的上下文(#2)中找不到数据库实例 Wrapped com.orientechnologies.orient.core.exception.OConfigurationException:找不到数据库实例context(#2)在上下文中找不到数据库实例

Error on parsing script at position #0: Error on execution of the script Script: newPOJS ------^ sun.mozilla.javascript.internal.WrappedException: Wrapped com.orientechnologies.orient.core.exception.OConfigurationException: No database instance found in context (#2) in at line number 2 Wrapped com.orientechnologies.orient.core.exception.OConfigurationException: No database instance found in context (#2) No database instance found in context

但是当我得到Graph而不是数据库时,以下函数工作正常

However following function works fine, when I get the Graph instead of database

var db = orient.getGraph() return 'test';

任何人都知道问题在哪里,

Any one has any idea where the issue,

我也进行了以下配置更改

I made the following configuration change as well

<handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter"> <parameters> <parameter value="true" name="enabled"/> </parameters> </handler>

推荐答案

此处

<handler class="com.orientechnologies.orient.graph.handler.OGraphServerHandler"> <parameters> <parameter value="true" name="enabled"/> <parameter value="50" name="graph.pool.max"/> </parameters> </handler>

需要从orientdb-server-config.xml中删除。因为似乎orient.getGraph()和orient.getDatabase()操作无法配置为同时工作。使用orient.getGraph()在配置文件中使用上面的处理程序。要使用orient.getDatabase(),请从config中删除以下处理程序。

need to be remove from orientdb-server-config.xml. Because it seems orient.getGraph() and orient.getDatabase() operations cannot be configured to work simultaneously. To work with orient.getGraph() use above handler in config file. To work with orient.getDatabase() remove following handler from config.

更多推荐

OrientDB在上下文错误中找不到数据库实例?

本文发布于:2023-10-26 11:49:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530047.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:下文   在上   中找   实例   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!