Gjertcimmc
New Member
I am getting started using Heroku and Neo4j. I have a servlet which runs locally to insert some nodes and create a relationship between them. When I use the same code at Heroku I get no error but just nothing happens. I have tried inserting nodes manually using webadmin at Neo4j and then reading it back in the code and again it works locally but at Heroku nothing happens. Again there is no error message.Here is the code:\[code\]String dbPATH = System.getenv("NEO4J_URL")+"/db/data";String dbName = "/mnt/e67f2f314/data/graph.db";String dbLoc = dbPATH+dbName;GraphDb=new GraphDatabaseFactory().newEmbeddedDatabase(dbLoc);\[/code\]Then I use:\[code\]ExecutionEngine engine = new ExecutionEngine(GraphDb);int length=-1;try{ ExecutionResult result = engine.execute("start n=node(*) return n"); if (result == null){ length = 0; } else { for (@SuppressWarnings("unused") Map<String, Object> row:result){ length++; } }} catch (NullPointerException e) {// _log.error(e.getMessage(),e); length=-2;}\[/code\]The length is 0, hence a null object is returned. I am using heroku run bash and then java -cp to run the jar file. heroku config:NEO4J_URL: http://xxx:[email protected]:I have tried a few variations on the dbLoc which is passed to newEmbeddedDatabase and nothing has worked.I would appreciate any links on implementing Java and Neo4j at Heroku for running a servlet.