Hi there, That again is OSGi playing against Java Service Loader. Look at the neo4j / osgi / bundle project to build a working superbundle with the default community jars and report back!
/peter Sent from my phone. On Jul 20, 2011 7:02 PM, "cyuczi eekc" <cyuczie...@gmail.com> wrote: > Hi! > I've been trying to fix this error, and I've kind of succeeded. > My context is, that I've pulled neo4j sources from github and using > them in eclipse (without maven and such), and I have the > neo4j-community sources as a project, and I am including this project > in any of my projects that require neo4j, instead of using the neo4j > precompiled jars > > So far so good, except I get that error. And my current workaround is: > unzip the file: META-INF\services\org.neo4j.graphdb.index.IndexProvider > from this jar: neo4j-lucene-index-1.4.jar > preserving the path into the neo4j-community project's "bin" folder > so it looks like: > ...\workspace\neo4j-community\bin\META-INF\services\org.neo4j.graphdb.index.IndexProvider > and the content for this file (for informational reasons): > " > org.neo4j.index.lucene.LuceneIndexProvider > " (without quotes) > > So this works, ie. in another project I include this neo4j-community > project and run something that uses lucene index (ie. > org.neo4j.examples.CalculateShortestPath) and I don't get that error > anymore, simply works. > > My question is, what is a better way to fix this error ? perhaps by > using java code instead ? > Or I don't know, why doesn't it use a default? Can I specify it from code? > Assume that I don't know much, and I've only discovered neo4j this > week, but I am into it and I want to build some things on top of it. > > this is the line that is causing the error (when I don't fix it as I > said above): > indexService = graphDb.index().forNodes( "nodes" ); > > and this is the full stacktrace for the error: > Exception in thread "main" java.lang.IllegalArgumentException: No > index provider 'lucene' found > at org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76) > at org.neo4j.kernel.IndexManagerImpl.findIndexConfig(IndexManagerImpl.java:116) > at org.neo4j.kernel.IndexManagerImpl.getOrCreateIndexConfig(IndexManagerImpl.java:178) > at org.neo4j.kernel.IndexManagerImpl.getOrCreateNodeIndex(IndexManagerImpl.java:267) > at org.neo4j.kernel.IndexManagerImpl.forNodes(IndexManagerImpl.java:255) > at org.neo4j.kernel.IndexManagerImpl.forNodes(IndexManagerImpl.java:249) > at org.neo4j.examples.CalculateShortestPath.main(CalculateShortestPath.java:43) > > > Thanks! > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user