当我通过停止 tomcat 来停止我的 Web 应用程序时,neo4j 数据库没有完全关闭。我总是收到以下异常,neo4j 在下次应用程序启动时进行数据库恢复。
该应用程序在嵌入式模式下使用 neo4j 运行,并使用 spring-data-neo4j 2.0、Java 1.7.0_11-b21 和 apache-tomcat-7.0.34。
任何人都可以帮忙吗?
Jan 23, 2013 6:13:52 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Unable to close logical log
java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel .end(AbstractInterruptibleChannel.java:202)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.j ava:705)
at org.neo4j.kernel.impl.transaction.xaframework.Dire ctMappedLogBuffer.writeOut(DirectMappedLogBuffer.j ava:159)
at org.neo4j.kernel.impl.transaction.xaframework.Dire ctMappedLogBuffer.force(DirectMappedLogBuffer.java :172)
at org.neo4j.kernel.impl.transaction.xaframework.XaLo gicalLog.releaseCurrentLogFile(XaLogicalLog.java:6 77)
at org.neo4j.kernel.impl.transaction.xaframework.XaLo gicalLog.close(XaLogicalLog.java:702)
at org.neo4j.kernel.impl.transaction.xaframework.XaCo ntainer.close(XaContainer.java:76)
at org.neo4j.index.impl.lucene.LuceneDataSource.close (LuceneDataSource.java:318)
at org.neo4j.kernel.impl.transaction.XaDataSourceMana ger.shutdown(XaDataSourceManager.java:106)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleIn stance.shutdown(LifeSupport.java:443)
at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(Li feSupport.java:211)
at org.neo4j.kernel.InternalAbstractGraphDatabase.shu tdown(InternalAbstractGraphDatabase.java:574)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.beans.factory.support.Disposab leBeanAdapter.invokeCustomDestroyMethod(Disposable BeanAdapter.java:320)
at org.springframework.beans.factory.support.Disposab leBeanAdapter.destroy(DisposableBeanAdapter.java:2 46)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroyBean(DefaultSingletonB eanRegistry.java:510)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroySingleton(DefaultSingl etonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroySingletons(DefaultSing letonBeanRegistry.java:455)
at org.springframework.context.support.AbstractApplic ationContext.destroyBeans(AbstractApplicationConte xt.java:1090)
at org.springframework.context.support.AbstractApplic ationContext.doClose(AbstractApplicationContext.ja va:1064)
at org.springframework.context.support.AbstractApplic ationContext.close(AbstractApplicationContext.java :1010)
at org.springframework.web.context.ContextLoader.clos eWebApplicationContext(ContextLoader.java:549)
at org.springframework.web.context.ContextLoaderListe ner.contextDestroyed(ContextLoaderListener.java:14 3)
at org.apache.catalina.core.StandardContext.listenerS top(StandardContext.java:4831)
at org.apache.catalina.core.StandardContext.stopInter nal(StandardContext.java:5478)
at org.apache.catalina.util.LifecycleBase.stop(Lifecy cleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.c all(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StopChild.c all(ContainerBase.java:1564)
at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:166)
at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)