无法在Neo4j/控制台http://localhost:7474中看到已创建的节点 [英] Not able to see created Node in Neo4j/console http://localhost:7474
问题描述
我正在尝试下面的Java代码,其工作正常,但是问题是我无法在localhost:7474控制台中的neo4j/database中看到创建的节点.我已经重新启动服务器,但是仍然存在相同的问题,任何人都可以帮忙.我也怀疑这些节点是在系统内存中创建的吗?
I am trying Java code below and its work fine as expected but problem is i am not able to see created node in neo4j/database in localhost:7474 console. I have restarted server but still same problem,can anyone please help.And I also doubt that is these node created in system memory?
void createDb() throws IOException
{
graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( "target/neo4j-hello-db" );
registerShutdownHook( graphDb );
BufferedReader CSVFile = null;
int i=0;
Transaction tx = graphDb.beginTx();
try
{
CSVFile = new BufferedReader(new FileReader("/home/sumit/Total_Keywords(0 - 3300000).csv"));
String dataRow = CSVFile.readLine();
while (dataRow != null){
i++;
if(i==200)
break;
String[] dataArray = dataRow.split(",");
for(String item:dataArray)
{
node = graphDb.createNode();
node.setProperty( "name", item );
System.out.println( node.getProperty( "name" ) );
tx.success();
}
dataRow = CSVFile.readLine();
}
}
finally
{
tx.finish();
CSVFile.close();
}
}
推荐答案
请检查您正在查看的服务器是否指向正确的数据库.
please check if the server you are looking at is pointed to correct db.
文件的位置是
conf/neo4j-server.properties
conf/neo4j-server.properties
检查以下行,看看它是否具有您在代码中使用的正确路径.
Check the following line and see if it has the correct path that you are using in your code.
org.neo4j.server.database.location = target/neo4j-hello-db
org.neo4j.server.database.location=target/neo4j-hello-db
这篇关于无法在Neo4j/控制台http://localhost:7474中看到已创建的节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!