I have created a foxx-application for a app I am working on. I was trying to install the foxx app in arangodb mainline.
I have followed the following steps:
1. create new database from arangosh 'db._createDatabase("databasename")'
2. run command 'foxx-manager --server.database "" fetch directory '
3. then run command 'foxx-manager --server.database "" mount '
But, when I looked at the logs it is giving following error
2014-11-23T04:08:44Z [2584] ERROR Cannot compute Foxx application routes: [ArangoError 1924: graph not found]
2014-11-23T04:08:44Z [2584] ERROR Cannot mount Foxx application 'app:contactspace:1.0': Error: Cannot compute the routing table for Foxx application 'app:contactspace:1.0', check the log file for errors!\n at Object.exports.appRoutes (/usr/share/arangodb/js/server/modules/org/arangodb/foxx/manager.js:1525:15)\n at Object.reloadRouting (/usr/share/arangodb/js/server/modules/org/arangodb/actions.js:1241:38)\n at global context method:1:33\n
I am not able understand the cause of this error. The setup script is running fine after mount but the mount itself is giving error.
The foxx app is working fine in case of arangodb dev instance.
Additional information from here:
Yes I am creating a general graph with only one edge definition. below is the setup.js for that
// load modules
var graph_module = require("org/arangodb/general-graph");
// create graph if does not already exists
var graph = null;
if(!graph_module._exists("sampleGraph")) {
var containsXRelation = graph_module._directedRelation("containsX", ["X"], ["X"]);
var edgeDefinitions = graph_module._edgeDefinitions(containsXRelation);
graph = graph_module._create("sampleGraph", edgeDefinitions);
}
else {
graph = graph_module._graph("sampleGraph");
}
them some more stuff like creating index's...
Also, I have some graph related code outside the controller actions:
var sampleGraph = graph_module._graph("sampleGraph");
var vertex = contactSpaceGraph._getVertexCollectionByName("contactX");
var edge = contactSpaceGraph._getEdgeCollectionByName("X");