gpt4 book ai didi

java - driver.CreateGraph 上的 ArangoDB JsonSyntaxException

转载 作者:行者123 更新时间:2023-12-01 11:14:58 27 4
gpt4 key购买 nike

我正在尝试使用其 Java 驱动程序测试 ArangoDB。我正在 CentOS 6.6 上测试它。我收到以下错误:

15:48:01.151 [main] DEBUG com.arangodb.http.HttpManager - [REQ]http-POST: url=http://127.0.0.1:8529/_api/gharial?waitForSync=true, headers=null, body={"name":"test","edgeDefinitions":[{"collection":"FriendsWith","from":["Profile"],"to":["Profile"]}],"orphanCollections":[]}
15:48:01.267 [main] DEBUG com.arangodb.http.HttpManager - [RES]http-POST: statusCode=503
15:48:01.269 [main] DEBUG com.arangodb.http.HttpManager - [RES]http-POST: text=<html><head><title>Service Unavailable</title></head><body><p>This service is temporarily not available. Please check the log file for errors.</p></body></html>
Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 29 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65)
at com.google.gson.JsonParser.parse(JsonParser.java:45)
at com.arangodb.BaseArangoDriver.createEntity(BaseArangoDriver.java:209)
at com.arangodb.BaseArangoDriver.createEntity(BaseArangoDriver.java:309)
at com.arangodb.impl.InternalGraphDriverImpl.createGraph(InternalGraphDriverImpl.java:80)
at com.arangodb.ArangoDriver.createGraph(ArangoDriver.java:4242)
at Program.main(Program.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 29 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1573)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1423)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:546)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:429)
at com.google.gson.JsonParser.parse(JsonParser.java:60)
... 11 more

Process finished with exit code 1

我尝试重新启动服务并重新安装。日志文件包含以下行:

2015-08-12T08:06:27Z [22123] ERROR TypeError: Cannot read property 'save' of undefined                                   
2015-08-12T08:06:27Z [22123] ERROR at createQueue (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/queues.js:109:15)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx/queues.js:394:1
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at createModule (/usr/share/arangodb/js/common/bootstrap/modules.js:517:19)
2015-08-12T08:06:27Z [22123] ERROR at requireModuleFrom (/usr/share/arangodb/js/common/bootstrap/modules.js:619:21)
2015-08-12T08:06:27Z [22123] ERROR at requirePackage (/usr/share/arangodb/js/common/bootstrap/modules.js:755:21)
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1209:21)
2015-08-12T08:06:27Z [22123] ERROR at args.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1367:21)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx.js:33:18
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at createModule (/usr/share/arangodb/js/common/bootstrap/modules.js:517:19)
2015-08-12T08:06:27Z [22123] ERROR at requireModuleFrom (/usr/share/arangodb/js/common/bootstrap/modules.js:619:21)
2015-08-12T08:06:27Z [22123] ERROR at requirePackage (/usr/share/arangodb/js/common/bootstrap/modules.js:772:21)
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1209:21)
2015-08-12T08:06:27Z [22123] ERROR at args.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1367:21)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:32:24
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:1395:2
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at ArangoApp.loadAppScript (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/arangoApp.js:452:24)
2015-08-12T08:06:27Z [22123] ERROR at mountController (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:662:7)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:631:9
2015-08-12T08:06:27Z [22123] ERROR at Array.forEach (native)
2015-08-12T08:06:27Z [22123] ERROR at routeApp (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:630:32)
2015-08-12T08:06:27Z [22123] ERROR at Object.routes (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/manager.js:268:10)
2015-08-12T08:06:27Z [22123] ERROR at foxxRouting (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1054:74)
2015-08-12T08:06:27Z [22123] ERROR at execute (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1308:7)
2015-08-12T08:06:27Z [22123] ERROR at Object.routeRequest (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1329:3)
2015-08-12T08:06:27Z [22123] ERROR at Function.actions.defineHttp.callback (/usr/share/arangodb/js/actions/api-system.js:58:15)
2015-08-12T08:06:27Z [22123] ERROR
2015-08-12T08:06:27Z [22123] ERROR [ArangoError 3103: failed to invoke module
2015-08-12T08:06:27Z [22123] ERROR File: /usr/share/arangodb/js/server/modules/org/arangodb/foxx/queues.js]
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1420:20)
2015-08-12T08:06:27Z [22123] ERROR at createModule (/usr/share/arangodb/js/common/bootstrap/modules.js:517:19)
2015-08-12T08:06:27Z [22123] ERROR at requireModuleFrom (/usr/share/arangodb/js/common/bootstrap/modules.js:619:21)
2015-08-12T08:06:27Z [22123] ERROR at requirePackage (/usr/share/arangodb/js/common/bootstrap/modules.js:755:21)
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1209:21)
2015-08-12T08:06:27Z [22123] ERROR at args.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1367:21)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx.js:33:18
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at createModule (/usr/share/arangodb/js/common/bootstrap/modules.js:517:19)
2015-08-12T08:06:27Z [22123] ERROR at requireModuleFrom (/usr/share/arangodb/js/common/bootstrap/modules.js:619:21)
2015-08-12T08:06:27Z [22123] ERROR at requirePackage (/usr/share/arangodb/js/common/bootstrap/modules.js:772:21)
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1209:21)
2015-08-12T08:06:27Z [22123] ERROR at args.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1367:21)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:32:24
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:1395:2
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at ArangoApp.loadAppScript (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/arangoApp.js:452:24)
2015-08-12T08:06:27Z [22123] ERROR at mountController (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:662:7)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:631:9
2015-08-12T08:06:27Z [22123] ERROR at Array.forEach (native)
2015-08-12T08:06:27Z [22123] ERROR at routeApp (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:630:32)
2015-08-12T08:06:27Z [22123] ERROR at Object.routes (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/manager.js:268:10)
2015-08-12T08:06:27Z [22123] ERROR at foxxRouting (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1054:74)
2015-08-12T08:06:27Z [22123] ERROR at execute (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1308:7)
2015-08-12T08:06:27Z [22123] ERROR at Object.routeRequest (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1329:3)
2015-08-12T08:06:27Z [22123] ERROR at Function.actions.defineHttp.callback (/usr/share/arangodb/js/actions/api-system.js:58:15)
2015-08-12T08:06:27Z [22123] ERROR
2015-08-12T08:06:27Z [22123] ERROR [ArangoError 3103: failed to invoke module
2015-08-12T08:06:27Z [22123] ERROR File: /usr/share/arangodb/js/server/modules/org/arangodb/foxx.js]
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1420:20)
2015-08-12T08:06:27Z [22123] ERROR at createModule (/usr/share/arangodb/js/common/bootstrap/modules.js:517:19)
2015-08-12T08:06:27Z [22123] ERROR at requireModuleFrom (/usr/share/arangodb/js/common/bootstrap/modules.js:619:21)
2015-08-12T08:06:27Z [22123] ERROR at requirePackage (/usr/share/arangodb/js/common/bootstrap/modules.js:772:21)
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1209:21)
2015-08-12T08:06:27Z [22123] ERROR at args.require (/usr/share/arangodb/js/common/bootstrap/modules.js:1367:21)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:32:24
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js:1395:2
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1415:10)
2015-08-12T08:06:27Z [22123] ERROR at ArangoApp.loadAppScript (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/arangoApp.js:452:24)
2015-08-12T08:06:27Z [22123] ERROR at mountController (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:662:7)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:631:9
2015-08-12T08:06:27Z [22123] ERROR at Array.forEach (native)
2015-08-12T08:06:27Z [22123] ERROR at routeApp (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:630:32)
2015-08-12T08:06:27Z [22123] ERROR at Object.routes (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/manager.js:268:10)
2015-08-12T08:06:27Z [22123] ERROR at foxxRouting (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1054:74)
2015-08-12T08:06:27Z [22123] ERROR at execute (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1308:7)
2015-08-12T08:06:27Z [22123] ERROR at Object.routeRequest (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1329:3)
2015-08-12T08:06:27Z [22123] ERROR at Function.actions.defineHttp.callback (/usr/share/arangodb/js/actions/api-system.js:58:15)
2015-08-12T08:06:27Z [22123] ERROR
2015-08-12T08:06:27Z [22123] ERROR Cannot compute Foxx application routes: [ArangoError 3103: failed to invoke module\nFile: /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js]
2015-08-12T08:06:27Z [22123] ERROR [ArangoError 3103: failed to invoke module
2015-08-12T08:06:27Z [22123] ERROR File: /usr/share/arangodb/js/apps/system/_api/gharial/APP/gharial.js]
2015-08-12T08:06:27Z [22123] ERROR at [object Object].Module.run (/usr/share/arangodb/js/common/bootstrap/modules.js:1420:20)
2015-08-12T08:06:27Z [22123] ERROR at ArangoApp.loadAppScript (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/arangoApp.js:452:24)
2015-08-12T08:06:27Z [22123] ERROR at mountController (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:662:7)
2015-08-12T08:06:27Z [22123] ERROR at /usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:631:9
2015-08-12T08:06:27Z [22123] ERROR at Array.forEach (native)
2015-08-12T08:06:27Z [22123] ERROR at routeApp (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/routing.js:630:32)
2015-08-12T08:06:27Z [22123] ERROR at Object.routes (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/manager.js:268:10)
2015-08-12T08:06:27Z [22123] ERROR at foxxRouting (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1054:74)
2015-08-12T08:06:27Z [22123] ERROR at execute (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1308:7)
2015-08-12T08:06:27Z [22123] ERROR at Object.routeRequest (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1329:3)
2015-08-12T08:06:27Z [22123] ERROR at Function.actions.defineHttp.callback (/usr/share/arangodb/js/actions/api-system.js:58:15)
2015-08-12T08:06:27Z [22123] ERROR

最佳答案

用户已删除系统_graphs集合,该集合用于ArangoDB内部的图形管理。

相应的错误消息有点令人困惑,并通过较新的 ArangoDB 版本进行了改进。

解决方案是 to recreate the the collection by specifying it will be a system collection :

db._create("_graphs", {isSystem: true})

关于java - driver.CreateGraph 上的 ArangoDB JsonSyntaxException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31946646/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com