[Neo4j] Rest api

Mattias Persson mattias at neotechnology.com
Thu Oct 28 11:32:42 CEST 2010


This looks to be a lucene version issue. You probably filled the index with
a recent neo4j milestone, am I right? Whereas the webadmin depends on neo4j
1.1, where 1.1 has an older dependency on lucene... hence the version
mismatch (lucene data isn't backwards compatible v.3 -> v.2) it seems.

2010/10/27 Francois Kassis <francois_kassis at hotmail.com>

> hi to all,
>
> I am using the webadmin 1.0
> the database is created and filled in java.
> while using index in rest as below:
>
> $ curl -H Accept:application/json
> http://localhost:9999/index/node/rootnodelabelindex/Products
>
> I got this error:
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 org.apache.lucene.index.CorruptIndexException:
> Incompatible format version: 2 expected 1 or lower</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing /index/node/rootnodelabelindex/Products. Reason:
> <pre>    org.apache.lucene.index.CorruptIndexException: Incompatible format
> version: 2 expected 1 or lower</pre></p><h3>Caused
> by:</h3><pre>java.lang.RuntimeException:
> org.apache.lucene.index.CorruptIndexException: Incompatible format version:
> 2 expected 1 or lower
>  at
> org.neo4j.index.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:358)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:301)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:246)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:232)
>  at org.neo4j.rest.domain.NodeIndex.get(NodeIndex.java:25)
>  at
> org.neo4j.rest.domain.StorageActions.getIndexedNodes(StorageActions.java:508)
>  at
> org.neo4j.rest.web.GenericWebService.getIndexedNodes(GenericWebService.java:635)
>  at
> org.neo4j.rest.web.GenericWebService.access$100(GenericWebService.java:42)
>  at
> org.neo4j.rest.web.GenericWebService$IndexType$1.get(GenericWebService.java:669)
>  at
> org.neo4j.rest.web.GenericWebService.getIndexedObjects(GenericWebService.java:611)
>  at
> org.neo4j.rest.web.JsonAndHtmlWebService.jsonGetIndexedObjects(JsonAndHtmlWebService.java:333)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:184)
>  at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
>  at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276)
>  at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
>  at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
>  at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
>  at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043)
>  at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406)
>  at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:477)
>  at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>  at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>  at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>  at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>  at org.mortbay.jetty.Server.handle(Server.java:322)
>  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>  at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>  at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>  at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: org.apache.lucene.index.CorruptIndexException: Incompatible
> format version: 2 expected 1 or lower
>  at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>  at
> org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(SegmentReader.java:277)
>  at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>  at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>  at
> org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>  at
> org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:76)
>  at
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>  at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>  at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>  at org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
>  at
> org.neo4j.index.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:349)
>  ... 41 more
> </pre>
> <h3>Caused by:</h3><pre>org.apache.lucene.index.CorruptIndexException:
> Incompatible format version: 2 expected 1 or lower
>  at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>  at
> org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(SegmentReader.java:277)
>  at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>  at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>  at
> org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>  at
> org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:76)
>  at
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>  at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>  at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>  at org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
>  at
> org.neo4j.index.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:349)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:301)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:246)
>  at
> org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:232)
>  at org.neo4j.rest.domain.NodeIndex.get(NodeIndex.java:25)
>  at
> org.neo4j.rest.domain.StorageActions.getIndexedNodes(StorageActions.java:508)
>  at
> org.neo4j.rest.web.GenericWebService.getIndexedNodes(GenericWebService.java:635)
>  at
> org.neo4j.rest.web.GenericWebService.access$100(GenericWebService.java:42)
>  at
> org.neo4j.rest.web.GenericWebService$IndexType$1.get(GenericWebService.java:669)
>  at
> org.neo4j.rest.web.GenericWebService.getIndexedObjects(GenericWebService.java:611)
>  at
> org.neo4j.rest.web.JsonAndHtmlWebService.jsonGetIndexedObjects(JsonAndHtmlWebService.java:333)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:184)
>  at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
>  at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276)
>  at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
>  at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
>  at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
>  at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053)
>  at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043)
>  at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406)
>  at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:477)
>  at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>  at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>  at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>  at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>  at org.mortbay.jetty.Server.handle(Server.java:322)
>  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>  at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>  at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>  at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> </pre>
> <hr /><i><small>Powered by Jetty://</small></i><br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
>
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [mattias at neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com


More information about the User mailing list