Question

I have configured my application using Spring-data-neo4j, where I can successfully persist, create relationships, etc.

Once I persist the data and stop my application, I then want to visualize the graph that I've created in NEOCLIPSE.

I can successfully see the graph as well in NEOCLIPSE.

The only problem I am having is.. once I close the connection in Neoclipse, and then re-run my application to listAllSavedEntities on a web page, I get this error :

`SEVERE: Servlet.service() for servlet [spring] in context with path [/sample] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: unrecognized format -3 in file "_0.fnm"] with root cause
org.apache.lucene.index.CorruptIndexException: unrecognized format -3 in file "_0.fnm"
    at org.apache.lucene.index.FieldInfos.read(FieldInfos.java:349)
    at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:71)
    at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1197)
    at org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1149)
    at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:602)
    at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:499)
    at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
    at org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:187)
    at org.springframework.data.neo4j.support.typerepresentation.AbstractIndexingTypeRepresentationStrategy.findAllRelBacked(AbstractIndexingTypeRepresentationStrategy.java:111)
    at org.springframework.data.neo4j.support.typerepresentation.AbstractIndexingTypeRepresentationStrategy.findAll(AbstractIndexingTypeRepresentationStrategy.java:82)
    at org.springframework.data.neo4j.support.typerepresentation.TypeRepresentationStrategies.findAll(TypeRepresentationStrategies.java:80)
    at org.springframework.data.neo4j.support.Neo4jTemplate.findAll(Neo4jTemplate.java:166)
    at org.springframework.data.neo4j.repository.AbstractGraphRepository.findAll(AbstractGraphRepository.java:131)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:322)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy18.findAll(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
    at com.sun.proxy.$Proxy21.findAll(Unknown Source)
    at com.adaranet.controller.DeviceController.listAllDevices(DeviceController.java:60)
    at com.adaranet.controller.DeviceController$$FastClassByCGLIB$$3ee50553.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
    at com.adaranet.controller.DeviceController$$EnhancerByCGLIB$$52cdcf0f.listAllDevices(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)`

I simply closed the connection in Neoclipse and then tried to list out my persisted entities. Nothing more to that.

I am not sure what's wrong in here :( :(

Any help would be appreciated. Thanks.

Was it helpful?

Solution

What neo4j kernel version does your neoclipse use and which one your application? Could it be that there is a version mismatch? Maybe neoclipse upgrades the data directories content to a newer version under the hood. That could be the cause for that unrecognized format -3 error message in your application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top