Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript OrientDB在上下文错误中找不到数据库实例?_Javascript_Orientdb - Fatal编程技术网

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

Javascript OrientDB在上下文错误中找不到数据库实例?,javascript,orientdb,Javascript,Orientdb,Orient DB已在orientdb-community-1.7-rc2中发布 当我尝试创建一个小函数时,如下所示 var db = orient.getDatabase() return 'test'; 并执行它,我得到以下错误 在位置#0处分析脚本时出错:执行脚本时出错 脚本:newPOJS ------^ sun.org.mozilla.javascript.internal.WrappedException:Wrapped com.orientechnologies.orient.c

Orient DB已在orientdb-community-1.7-rc2中发布

当我尝试创建一个小函数时,如下所示

var db = orient.getDatabase()
return 'test';
并执行它,我得到以下错误

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

然而,当我得到图形而不是数据库时,下面的函数可以很好地工作

var db = orient.getGraph()
return 'test';
任何人都知道问题在哪里

我还做了以下配置更改

    <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(),请从配置中删除以下处理程序