我们在 RHEL (jdk 1.7.. 51) 上使用 Neo4j2.0.1 - 我们在一个同步线程上调用 GraphDatabaseService.shutDown(),并且此方法永远不会返回或引发任何异常。

同时尝试访问图形的其他线程在 beginTran() 上遇到此异常

org.neo4j.graphdb.TransactionFailureException: Database is currently not available. No blocking components 
        at org.neo4j.kernel.InternalAbstractGraphDatabase.beginTx(InternalAbstractGraphDatabase.java:944) 
        at org.neo4j.kernel.TransactionBuilderImpl.begin(TransactionBuilderImpl.java:43) 
        at net.ahm.graph.EmbeddedDBService.beginTx(EmbeddedDBService.java:275) 
        at net.ahm.cm.graph.SummaryForPatientDAO.process(SummaryForPatientDAO.java:29) 
        at net.ahm.cm.handlers.admin.GetSummaryPatientInfoMessageHandlerImpl.processAction(GetSummaryPatientInfoMessageHandlerImpl.java:15) 
        at net.ahm.cm.handlers.common.BaseCareTeamHandler.doWork(BaseCareTeamHandler.java:46) 
        at net.ahm.cm.handlers.common.CareTeamServicesHandler.processService(CareTeamServicesHandler.java:197) 
        at net.ahm.cm.thrift.services.common.CareTeamServices$Processor$processService.getResult(CareTeamServices.java:178) 
        at net.ahm.cm.thrift.services.common.CareTeamServices$Processor$processService.getResult(CareTeamServices.java:162) 
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) 
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 
        at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123) 
        at org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:516) 
        at org.apache.thrift.server.Invocation.run(Invocation.java:18) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
        at java.lang.Thread.run(Thread.java:744) 

导致 shutdown() 方法几乎永远阻塞的可能原因是什么。 请指教。

请您参考如下方法:

几个小时前,我遇到了类似的问题,当时我不小心在 GraphDatabaseService 实例上调用了 db.shutdown(),然后尝试在同一实例上调用其他方法。也许您可以发布一些代码,以便我们获得更多信息来进行推理。到目前为止,您的问题最可能的原因就是我所描述的。


评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!