打开neo4j DB

时间:2016-04-02 17:10:17

标签: java tomcat neo4j

您好我正在部署我在计算机上编写的应用程序(使用tomcat进行所有部署) 当运行应用程序(在浏览器中)时,我收到错误  从catalina.out中取出:

java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory,
     

/家庭/ ubu01 / neo4jDB         在org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)         在org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)         在org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)         at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:129)         at org.neo4j.graphdb.factory.GraphDatabaseFactory $ 1.newDatabase(GraphDatabaseFactory.java:117)         at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:185)         at com.saeedh.utils.NeoQuery.InitDatabase(NeoQuery.java:46)         在com.saeedh.utils.NeoQuery.AuthinUser(NeoQuery.java:153)         在com.saeedh.servlets.start.Login.doGet(Login.java:79)         在javax.servlet.http.HttpServlet.service(HttpServlet.java:622)         在javax.servlet.http.HttpServlet.service(HttpServlet.java:729)         在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)         在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)         在org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)         在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)         在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)         at com.saeedh.filters.PageValidationFilter.doFilter(PageValidationFilter.java:48)         在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)         在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)         在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)         在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)         在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)         在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)         在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)         在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)         at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:674)         在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1500)         在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1456)         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)         at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)         at org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)         在java.lang.Thread.run(Thread.java:745)       引起:org.neo4j.kernel.lifecycle.LifecycleException:Component' org.neo4j.kernel.NeoStoreDataSource@4724a951'是   已成功初始化,但未能启动。请参照附件   引起异常。         在org.neo4j.kernel.lifecycle.LifeSupport $ LifecycleInstance.start(LifeSupport.java:462)         在org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)         at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112)         在org.neo4j.kernel.lifecycle.LifeSupport $ LifecycleInstance.start(LifeSupport.java:452)         在org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)         在org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)

但应用程序在我的机器上正常工作 我尝试了这里建议的解决方案:
Error Obtaining Lock (org.neo4j.kernal.StoreLockException)

它没有用,我正在使用以下方式访问数据库:

db = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(new File("path to the database")).loadPropertiesFromFile("path to properties file")
        .newGraphDatabase();
registerShutdownHook(db);

可能是什么问题?

1 个答案:

答案 0 :(得分:0)

一次只能有一个进程访问磁盘上的商店目录。

在启动嵌入式数据库时,请确保访问同一数据库的所有服务器和其他进程都已完全停止。