Thanks Peter, I now understand :) However that is too advanced for my little brain so I'm not going to get into it, the current solution is acceptable for me.
PS: you mispelled "programmatic" =)) (I'm actually laughing with you, not at you xD) Cheers, Good day! W3doYXQgZG8geW91IG1lYW4gSSBtaXNzcGVsbGVkICJtaXNzcGVsbGVkIiA/ISBsb2xd On Wed, Jul 20, 2011 at 8:04 PM, Peter Neubauer < [email protected]> wrote: > Hi there, > this is not Neo4j using this file, but the Java Service Loader > requiring this, > http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html > > If you find some programatic way to add services, that could be good > for the OSGi setup scenarios, too :) > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/ - Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Wed, Jul 20, 2011 at 8:00 PM, cyuczi eekc <[email protected]> wrote: > > that is awesome! that file is there: > > > ..\workspace\neo4j-community\lucene-index\src\main\resources\META-INF\services\ > > though if I add "lucene-index\src\main\resources\" as source folder, i > get > > some weird java exception and no-class def found error :)) > > but you probably only wanted me to add it in class path or something, > let's > > see ... > > Yeah that works, so in eclipse: Project->Properties->Java Build > > Path->Libraries-> Add Class Folder: > > "neo4j-community\lucene-index\src\main\resources\" > > where in my case neo4j-community is the name of the project which I chose > > when I git cloned or something > > > > And it works! Yeahhh, me happy ;) hey it's better than pulling out that > file > > from the .jar :) > > is there any other way to do this from code? ie. without neo4j having to > use > > that specific file ? maybe I could call some method and tell it to use > the > > lucene index? > > Even so, this was great progress! Thank you so mucho haha :P > > > > On Wed, Jul 20, 2011 at 7:46 PM, Peter Neubauer < > > [email protected]> wrote: > > > >> For sources, > >> I guess you would need to mount the src/main/resources folders as > >> source folders in order to have the META-INF/services files on the > >> classpath. Does that work? > >> > >> Cheers, > >> > >> /peter neubauer > >> > >> GTalk: neubauer.peter > >> Skype peter.neubauer > >> Phone +46 704 106975 > >> LinkedIn http://www.linkedin.com/in/neubauer > >> Twitter http://twitter.com/peterneubauer > >> > >> http://www.neo4j.org - Your high performance graph > database. > >> http://startupbootcamp.org/ - Öresund - Innovation happens HERE. > >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > >> > >> > >> > >> On Wed, Jul 20, 2011 at 7:43 PM, cyuczi eekc <[email protected]> > wrote: > >> > but but I don't know what osgi and project bundle stuff really is :) > I > >> > don't think I would need that for what I want. (if those mean building > as > >> > .jar or using jars) > >> > What I actually want is to keep the neo4j-community project (which is > >> git > >> > linked to the github sources), keep this as source only (without > having > >> it > >> > bundled or exported as jar, but probably having it compiled as classes > >> aka > >> > build project) and have this project used by other projects(by simply > >> > including the project instead of its .jars or anything else), so that > I > >> can > >> > see the javadoc(and jump to the source) and even eventually edit a few > >> parts > >> > (of neo4j) and add ie. a System.out.println() (if it were bundled I > >> couldn't > >> > do that, unless I'd rebundle it, that would be a headache to do on > each > >> > modify or git fetch). > >> > In other words, I want to be able to use neo4j, from the sources (no > >> > .jars). I've been able to use other projects like this before (ie. > >> > jmonkeyengine aka jme3). > >> > In this regard, is there a better fix? > >> > Thank you. > >> > > >> > On Wed, Jul 20, 2011 at 7:17 PM, Peter Neubauer < > >> [email protected]>wrote: > >> > > >> >> 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" <[email protected]> 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 > >> >> > [email protected] > >> >> > https://lists.neo4j.org/mailman/listinfo/user > >> >> _______________________________________________ > >> >> Neo4j mailing list > >> >> [email protected] > >> >> https://lists.neo4j.org/mailman/listinfo/user > >> >> > >> > _______________________________________________ > >> > Neo4j mailing list > >> > [email protected] > >> > https://lists.neo4j.org/mailman/listinfo/user > >> > > >> _______________________________________________ > >> Neo4j mailing list > >> [email protected] > >> https://lists.neo4j.org/mailman/listinfo/user > >> > > _______________________________________________ > > Neo4j mailing list > > [email protected] > > https://lists.neo4j.org/mailman/listinfo/user > > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

