Reputation: 25862
At my Neo4j 3.1.3/SDN 4 project from time to time I'm facing with a following Neo4j exception:
Caused by: java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: Could not apply the transaction to the store after written to log
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89)
at org.neo4j.ogm.autoindex.AutoIndexManager.assertIndexes(AutoIndexManager.java:187)
at org.neo4j.ogm.autoindex.AutoIndexManager.build(AutoIndexManager.java:92)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:45)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:93)
at com.example.domain.api.configuration.Neo4jConfig.sessionFactory(Neo4jConfig.java:38)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.CGLIB$sessionFactory$2(<generated>)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9$$FastClassBySpringCGLIB$$e2dbf1bb.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.sessionFactory(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
I use Bolt driver in order to connect to Neo4j.
In order to solve this situation I have to restart my Neo4j server and also I have to restart my application(restart Tomcat server).
Is it possible to configure my Bolt driver/datasource.. etc in order to get my application up and running with no needs to restart the application itself.. only restart neo4j server ?
Upvotes: 2
Views: 1588
Reputation: 1270
Not sure this is related to OGM, it rather looks a problem on the db side. Maybe report this on the neo4j gitub with relevant db logs.
Disabling index checks at application startup might help.
This can be done by removing indexes.auto
entry from ogm.properties
file (or equivalent java config).
see http://neo4j.com/docs/ogm-manual/current/reference/#reference:indexing
Upvotes: 1