Re: [Neo4j] OSGi and Neo4j - superbundle approach
Mmh, not really an idea so far. The steps you describe look OK. Try to build and install the Neo4j bundle alone: cd neo4j-osgi/bundle mvn clean install Then try out this project: https://github.com/jri/neo4j-osgi-test It provisions a standalone Felix runtime (with the aid of Pax Runner). There I also describe the steps that worked for me (seemingly the same as you tried :-| Cheers, Jörg On Jul 26, 2011, at 23:37, Jean-Pierre Bergamin wrote: > Helly everyone > > I'm currently also stuck with the "No index provider 'lucene' found" > error that you all seem to have been able to work around. > I have built and installed the 1.5-SNAPSHOT kernel from the > bundle-friendly-classloader branch and installed it locally (mvn > install). > When I run the neo4j-osgi tests I still get the mentioned lucene error: > > ... > [FelixDispatchQueue] DEBUG org.neo4j.examples.osgi.test-bundle - > BundleEvent STOPPED > ERROR: Bundle org.neo4j.examples.osgi.test-bundle [3] Error starting > file:bundles/org.neo4j.examples.osgi.test-bundle_0.1.0.SNAPSHOT.jar > (org.osgi.framework.BundleException: Activator start error in bundle > org.neo4j.examples.osgi.test-bundle [3].) > java.lang.IllegalArgumentException: No index provider 'lucene' found >at > org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76) > ... > > Failed tests: > neo4jStartupTest(org.neo4j.examples.osgi.OSGiTest) > bundleStartupTest(org.neo4j.examples.osgi.OSGiTest) > > Is there anything else I have to to so that I get the examples up and running? > > > Best regards, > James ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
BTW: When I try to install the bundle org.neo4j.examples.osgi:test-bundle on virgo I also get the lucene error, although I have deployed the patched neo4j 1.5-SNAPSHOT bundles to the repository/usr of Virgo. It seems as if the test-bundle has the correct manifest and I can verify that Virgo provides the imported packages, e.g. with "clhas org.neo4j.graphdb.index.IndexProvider". Best regards, James 2011/7/26 Jean-Pierre Bergamin : > Helly everyone > > I'm currently also stuck with the "No index provider 'lucene' found" > error that you all seem to have been able to work around. > I have built and installed the 1.5-SNAPSHOT kernel from the > bundle-friendly-classloader branch and installed it locally (mvn > install). > When I run the neo4j-osgi tests I still get the mentioned lucene error: > > ... > [FelixDispatchQueue] DEBUG org.neo4j.examples.osgi.test-bundle - > BundleEvent STOPPED > ERROR: Bundle org.neo4j.examples.osgi.test-bundle [3] Error starting > file:bundles/org.neo4j.examples.osgi.test-bundle_0.1.0.SNAPSHOT.jar > (org.osgi.framework.BundleException: Activator start error in bundle > org.neo4j.examples.osgi.test-bundle [3].) > java.lang.IllegalArgumentException: No index provider 'lucene' found > at > org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76) > ... > > Failed tests: > neo4jStartupTest(org.neo4j.examples.osgi.OSGiTest) > bundleStartupTest(org.neo4j.examples.osgi.OSGiTest) > > Is there anything else I have to to so that I get the examples up and running? > > > Best regards, > James > > > 2011/7/26 Nicolas Jouanin : >> Glad to hear that ! >> >> 2011/7/25 Jörg Richter >> >>> >>> Hi Peter, >>> >>> SUCCESS!!! >>> >>> "No index provider 'lucene' found" in OSGi is solved for the moment! >>> >>> Its exactly as you suggest: >>> When using pax exam's native container no error shows up. >>> When using pax exam's pax runner container the error shows up (which is >>> correct OSGi behavoir). >>> When using bundle-friendly-classloader branch of neo 1.5-SNAPSHOT kernel >>> the error disappears! >>> My neo4j-osgi-test project runs successful now! >>> >>> I'm looking forward to have a patch like yours in the next neo4j stable. >>> >>> Thank you and Toni very much for investigation. >>> >>> Cheers, >>> Jörg >>> >>> >>> On Jul 24, 2011, at 22:08, Peter Neubauer wrote: >>> >>> > Jörg, >>> > there where several issues Toni and me found when looking at your >>> > example. Thanks a lot! >>> > >>> > First of all, Pax Exam Player using the built-in native OSGi Runner is >>> > not emulating the real platform classloading correctly. Toni is at >>> > this one, the tests are switched to the PaxRunner instead, running in >>> > its own process. >>> > >>> > Secondly, the Neo4j Service.java that is loading the classes and >>> > resources is not providing a classloader, which in an OSGi bundle >>> > defaults to a classloader that does not find the interesting classes >>> > and services. With >>> > >>> > private static Iterable java6Loader( Class type ) >>> > { >>> > try >>> > { >>> > @SuppressWarnings( "unchecked" ) Iterable result = >>> (Iterable) >>> > Class.forName( "java.util.ServiceLoader" ) >>> > .getMethod( "load", Class.class, ClassLoader.class ) >>> > .invoke( null, type, Service.class.getClassLoader() ); >>> > return filterExceptions( result ); >>> > } >>> > catch ( Exception e ) >>> > { >>> > return null; >>> > } >>> > catch ( LinkageError e ) >>> > { >>> > return null; >>> > } >>> > } >>> > >>> > Everything works, but we need to discuss more what classloader to >>> > chose in what contexts, as this might not be great in all >>> > circumstances. >>> > >>> > Anyway, you can build the fixed kernel project from >>> > https://github.com/neo4j/community/tree/bundle-friendly-classloader, >>> > then build the https://github.com/neo4j/neo4j-osgi and you should be >>> > able to start up your test project (see my pull request). >>> > >>> > Let me know if that works! >>> > >>> > /peter >>> >>> ___ >>> 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 >> > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Helly everyone I'm currently also stuck with the "No index provider 'lucene' found" error that you all seem to have been able to work around. I have built and installed the 1.5-SNAPSHOT kernel from the bundle-friendly-classloader branch and installed it locally (mvn install). When I run the neo4j-osgi tests I still get the mentioned lucene error: ... [FelixDispatchQueue] DEBUG org.neo4j.examples.osgi.test-bundle - BundleEvent STOPPED ERROR: Bundle org.neo4j.examples.osgi.test-bundle [3] Error starting file:bundles/org.neo4j.examples.osgi.test-bundle_0.1.0.SNAPSHOT.jar (org.osgi.framework.BundleException: Activator start error in bundle org.neo4j.examples.osgi.test-bundle [3].) java.lang.IllegalArgumentException: No index provider 'lucene' found at org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76) ... Failed tests: neo4jStartupTest(org.neo4j.examples.osgi.OSGiTest) bundleStartupTest(org.neo4j.examples.osgi.OSGiTest) Is there anything else I have to to so that I get the examples up and running? Best regards, James 2011/7/26 Nicolas Jouanin : > Glad to hear that ! > > 2011/7/25 Jörg Richter > >> >> Hi Peter, >> >> SUCCESS!!! >> >> "No index provider 'lucene' found" in OSGi is solved for the moment! >> >> Its exactly as you suggest: >> When using pax exam's native container no error shows up. >> When using pax exam's pax runner container the error shows up (which is >> correct OSGi behavoir). >> When using bundle-friendly-classloader branch of neo 1.5-SNAPSHOT kernel >> the error disappears! >> My neo4j-osgi-test project runs successful now! >> >> I'm looking forward to have a patch like yours in the next neo4j stable. >> >> Thank you and Toni very much for investigation. >> >> Cheers, >> Jörg >> >> >> On Jul 24, 2011, at 22:08, Peter Neubauer wrote: >> >> > Jörg, >> > there where several issues Toni and me found when looking at your >> > example. Thanks a lot! >> > >> > First of all, Pax Exam Player using the built-in native OSGi Runner is >> > not emulating the real platform classloading correctly. Toni is at >> > this one, the tests are switched to the PaxRunner instead, running in >> > its own process. >> > >> > Secondly, the Neo4j Service.java that is loading the classes and >> > resources is not providing a classloader, which in an OSGi bundle >> > defaults to a classloader that does not find the interesting classes >> > and services. With >> > >> > private static Iterable java6Loader( Class type ) >> > { >> > try >> > { >> > @SuppressWarnings( "unchecked" ) Iterable result = >> (Iterable) >> > Class.forName( "java.util.ServiceLoader" ) >> > .getMethod( "load", Class.class, ClassLoader.class ) >> > .invoke( null, type, Service.class.getClassLoader() ); >> > return filterExceptions( result ); >> > } >> > catch ( Exception e ) >> > { >> > return null; >> > } >> > catch ( LinkageError e ) >> > { >> > return null; >> > } >> > } >> > >> > Everything works, but we need to discuss more what classloader to >> > chose in what contexts, as this might not be great in all >> > circumstances. >> > >> > Anyway, you can build the fixed kernel project from >> > https://github.com/neo4j/community/tree/bundle-friendly-classloader, >> > then build the https://github.com/neo4j/neo4j-osgi and you should be >> > able to start up your test project (see my pull request). >> > >> > Let me know if that works! >> > >> > /peter >> >> ___ >> 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 > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Glad to hear that ! 2011/7/25 Jörg Richter > > Hi Peter, > > SUCCESS!!! > > "No index provider 'lucene' found" in OSGi is solved for the moment! > > Its exactly as you suggest: > When using pax exam's native container no error shows up. > When using pax exam's pax runner container the error shows up (which is > correct OSGi behavoir). > When using bundle-friendly-classloader branch of neo 1.5-SNAPSHOT kernel > the error disappears! > My neo4j-osgi-test project runs successful now! > > I'm looking forward to have a patch like yours in the next neo4j stable. > > Thank you and Toni very much for investigation. > > Cheers, > Jörg > > > On Jul 24, 2011, at 22:08, Peter Neubauer wrote: > > > Jörg, > > there where several issues Toni and me found when looking at your > > example. Thanks a lot! > > > > First of all, Pax Exam Player using the built-in native OSGi Runner is > > not emulating the real platform classloading correctly. Toni is at > > this one, the tests are switched to the PaxRunner instead, running in > > its own process. > > > > Secondly, the Neo4j Service.java that is loading the classes and > > resources is not providing a classloader, which in an OSGi bundle > > defaults to a classloader that does not find the interesting classes > > and services. With > > > > private static Iterable java6Loader( Class type ) > >{ > >try > >{ > >@SuppressWarnings( "unchecked" ) Iterable result = > (Iterable) > >Class.forName( "java.util.ServiceLoader" ) > >.getMethod( "load", Class.class, ClassLoader.class ) > >.invoke( null, type, Service.class.getClassLoader() ); > >return filterExceptions( result ); > >} > >catch ( Exception e ) > >{ > >return null; > >} > >catch ( LinkageError e ) > >{ > >return null; > >} > >} > > > > Everything works, but we need to discuss more what classloader to > > chose in what contexts, as this might not be great in all > > circumstances. > > > > Anyway, you can build the fixed kernel project from > > https://github.com/neo4j/community/tree/bundle-friendly-classloader, > > then build the https://github.com/neo4j/neo4j-osgi and you should be > > able to start up your test project (see my pull request). > > > > Let me know if that works! > > > > /peter > > ___ > 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
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Peter, SUCCESS!!! "No index provider 'lucene' found" in OSGi is solved for the moment! Its exactly as you suggest: When using pax exam's native container no error shows up. When using pax exam's pax runner container the error shows up (which is correct OSGi behavoir). When using bundle-friendly-classloader branch of neo 1.5-SNAPSHOT kernel the error disappears! My neo4j-osgi-test project runs successful now! I'm looking forward to have a patch like yours in the next neo4j stable. Thank you and Toni very much for investigation. Cheers, Jörg On Jul 24, 2011, at 22:08, Peter Neubauer wrote: > Jörg, > there where several issues Toni and me found when looking at your > example. Thanks a lot! > > First of all, Pax Exam Player using the built-in native OSGi Runner is > not emulating the real platform classloading correctly. Toni is at > this one, the tests are switched to the PaxRunner instead, running in > its own process. > > Secondly, the Neo4j Service.java that is loading the classes and > resources is not providing a classloader, which in an OSGi bundle > defaults to a classloader that does not find the interesting classes > and services. With > > private static Iterable java6Loader( Class type ) >{ >try >{ >@SuppressWarnings( "unchecked" ) Iterable result = (Iterable) >Class.forName( "java.util.ServiceLoader" ) >.getMethod( "load", Class.class, ClassLoader.class ) >.invoke( null, type, Service.class.getClassLoader() ); >return filterExceptions( result ); >} >catch ( Exception e ) >{ >return null; >} >catch ( LinkageError e ) >{ >return null; >} >} > > Everything works, but we need to discuss more what classloader to > chose in what contexts, as this might not be great in all > circumstances. > > Anyway, you can build the fixed kernel project from > https://github.com/neo4j/community/tree/bundle-friendly-classloader, > then build the https://github.com/neo4j/neo4j-osgi and you should be > able to start up your test project (see my pull request). > > Let me know if that works! > > /peter ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Jörg, there where several issues Toni and me found when looking at your example. Thanks a lot! First of all, Pax Exam Player using the built-in native OSGi Runner is not emulating the real platform classloading correctly. Toni is at this one, the tests are switched to the PaxRunner instead, running in its own process. Secondly, the Neo4j Service.java that is loading the classes and resources is not providing a classloader, which in an OSGi bundle defaults to a classloader that does not find the interesting classes and services. With private static Iterable java6Loader( Class type ) { try { @SuppressWarnings( "unchecked" ) Iterable result = (Iterable) Class.forName( "java.util.ServiceLoader" ) .getMethod( "load", Class.class, ClassLoader.class ) .invoke( null, type, Service.class.getClassLoader() ); return filterExceptions( result ); } catch ( Exception e ) { return null; } catch ( LinkageError e ) { return null; } } Everything works, but we need to discuss more what classloader to chose in what contexts, as this might not be great in all circumstances. Anyway, you can build the fixed kernel project from https://github.com/neo4j/community/tree/bundle-friendly-classloader, then build the https://github.com/neo4j/neo4j-osgi and you should be able to start up your test project (see my pull request). Let me know if that works! /peter On Sat, Jul 23, 2011 at 12:47 PM, Peter Neubauer wrote: > Yes, > IT seems so. Will check with Toni. > > /peter > > Sent from my phone. > > On Jul 23, 2011 2:11 PM, "Jörg Richter" wrote: >> >> Meanwhile I tried a 3rd test scenario: Activator and all neo packages in >> one bundle again, but in a proper one (additional inlining of embedded jars >> suppressed). Same error: "No index provider 'lucene' found". >> >> To run the various test scenarios checkout the respective tag, as >> described: >> https://github.com/jri/neo4j-osgi-test >> >> Apparently there is a crucial difference in classloading (or something) >> when running in Pax Exam and when running independantly. >> >> Cheers, >> Jörg >> >> >> On Jul 23, 2011, at 8:11, Peter Neubauer wrote: >> >>> I can see your problem in the project. It seems the bundle is inlining >>> all the classes, AND adding the dependencies as JARs. >> >> ___ >> 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
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Yes, IT seems so. Will check with Toni. /peter Sent from my phone. On Jul 23, 2011 2:11 PM, "Jörg Richter" wrote: > > Meanwhile I tried a 3rd test scenario: Activator and all neo packages in one bundle again, but in a proper one (additional inlining of embedded jars suppressed). Same error: "No index provider 'lucene' found". > > To run the various test scenarios checkout the respective tag, as described: > https://github.com/jri/neo4j-osgi-test > > Apparently there is a crucial difference in classloading (or something) when running in Pax Exam and when running independantly. > > Cheers, > Jörg > > > On Jul 23, 2011, at 8:11, Peter Neubauer wrote: > >> I can see your problem in the project. It seems the bundle is inlining >> all the classes, AND adding the dependencies as JARs. > > ___ > 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
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Meanwhile I tried a 3rd test scenario: Activator and all neo packages in one bundle again, but in a proper one (additional inlining of embedded jars suppressed). Same error: "No index provider 'lucene' found". To run the various test scenarios checkout the respective tag, as described: https://github.com/jri/neo4j-osgi-test Apparently there is a crucial difference in classloading (or something) when running in Pax Exam and when running independantly. Cheers, Jörg On Jul 23, 2011, at 8:11, Peter Neubauer wrote: > I can see your problem in the project. It seems the bundle is inlining > all the classes, AND adding the dependencies as JARs. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Peter, no problem, take your time. I see your super bundle test running OK in pax exam, but with an independant deployment scenario "No index provider 'lucene' found" is a persisting error. Meanwhile I tried the approach you suggested: having the neo-super-bundle and my activator as separate bundles. No success. And even with your "official" super-bundle (neo4j/neo4j-osgi/bundle): same error. To demonstrate the problem I refactored the test project to utilize your super-bundle: https://github.com/jri/neo4j-osgi-test To run it: git clone git://github.com/neo4j/neo4j-osgi.git cd neo4j-osgi mvn clean install cd .. git clone git://github.com/jri/neo4j-osgi-test.git cd neo4j-osgi-test mvn clean install pax:run The test is very small. Just your super-bundle as dependency: org.neo4j neo4j-osgi-bundle 0.1-SNAPSHOT provided And my activator (in package de.deepamehta.neo4j): public void start(BundleContext context) { GraphDatabaseService neo4j = new EmbeddedGraphDatabase("test-db"); Index index = neo4j.index().forNodes("exact"); } Along with straight-forward bundling instructions for the activator: de.deepamehta.neo4j de.deepamehta.neo4j.Activator I'm eager for knowledge. Have a nice travel :) Cheers, Jörg On Jul 23, 2011, at 8:11, Peter Neubauer wrote: > Jörg, > I can see your problem in the project. It seems the bundle is inlining > all the classes, AND adding the dependencies as JARs. > > I have no time to investigate further because of travel for the next > day, but it might be that the Activator being in the bundle with the > libraries is messing up the build. Could you try the other approach > like in neo4j-osgi - having a library bundle, and your activator in a > separate one? > > Cheers, > > /peter neubauer ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Jörg, I can see your problem in the project. It seems the bundle is inlining all the classes, AND adding the dependencies as JARs. I have no time to investigate further because of travel for the next day, but it might be that the Activator being in the bundle with the libraries is messing up the build. Could you try the other approach like in neo4j-osgi - having a library bundle, and your activator in a separate one? 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 Sat, Jul 23, 2011 at 1:33 AM, Jörg Richter wrote: > > On Jul 23, 2011, at 1:13, Peter Neubauer wrote: > >> Will try to check it out tomorrow. Now sleep. Thanks for the test! > > Sure. > > Just one addition for tomorrow: the only neo-bundles my application need are > kernel and lucene-index. So I did add just these 2 to the super bundle's > dependencies instead the neo4j meta package. > > Good night! > Jörg > > ___ > 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
Re: [Neo4j] OSGi and Neo4j - superbundle approach
On Jul 23, 2011, at 1:13, Peter Neubauer wrote: > Will try to check it out tomorrow. Now sleep. Thanks for the test! Sure. Just one addition for tomorrow: the only neo-bundles my application need are kernel and lucene-index. So I did add just these 2 to the super bundle's dependencies instead the neo4j meta package. Good night! Jörg ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Jörg, Will try to check it out tomorrow. Now sleep. Thanks for the test! /peter Sent from my phone. On Jul 23, 2011 1:10 AM, "Jörg Richter" wrote: > > I'm seriously trying the superbundle approach and can't get rid of "No index provider 'lucene' found". > > The tests at https://github.com/neo4j/neo4j-osgi run successful but I have serious problems to transfer them to my application (I'm using Felix 3.2.1 on a Mac). > > Just to check my understanding: the "No index provider 'lucene' found" problem is with fine granular bundling, OSGi classloaders, and Java's service loader. One way to solve it is the superbundle approach: putting the user application's activator and all required neo and lucene bundles/libs into a single bundle. Correct? > > So I took neo4j-osgi/bundle/pom.xml as an template for my application's pom, especially its bundle plugin configuration: > > !javax.transaction.*,!com.sun.*,!sun.misc.*,!org.junit.*,!junit.*,*; > org.neo4j.*;version="1.4",* > *;scope=compile|runtime > true > > and added my application's activator: > > de.deepamehta.neo4j.Activator > > The activator's start() method is fairly simple: > > public void start(BundleContext context) { > GraphDatabaseService neo4j = new EmbeddedGraphDatabase("test-db"); > Index index = neo4j.index().forNodes("exact"); > } > > But it throws: java.lang.IllegalArgumentException: No index provider 'lucene' found > > The bundle list looks fine (#1 is the super bundle): > > ID|State |Level|Name > 0|Active | 0|System Bundle (3.2.1) > 1|Resolved | 5|Neo4j OSGi Test (0.1.0) > 2|Active | 1|Apache Felix Gogo Command (0.8.0) > 3|Active | 1|Apache Felix Gogo Runtime (0.8.0) > 4|Active | 1|Apache Felix Gogo Shell (0.8.0) > > To let you reproduce this I packed a minimal test project here: > https://github.com/jri/neo4j-osgi-test > > Run it: > git clone git://github.com/jri/neo4j-osgi-test.git > cd neo4j-osgi-test > mvn clean install pax:run > > This uses pax runner to provision the super bundle in a Felix runtime. > Deploying the super bundle manually in Felix makes no difference. > > Using the latest Maven bundle plugin (2.3.5 instead of 1.4) makes no difference (after tweaking the pom a little) and also getting rid of the bundle plugin's warnings (again by tweaking the pom) makes no difference. > > Who can help? > > Cheers, > Jörg > > ___ > 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
Re: [Neo4j] OSGi and Neo4j - superbundle approach
I'm seriously trying the superbundle approach and can't get rid of "No index provider 'lucene' found". The tests at https://github.com/neo4j/neo4j-osgi run successful but I have serious problems to transfer them to my application (I'm using Felix 3.2.1 on a Mac). Just to check my understanding: the "No index provider 'lucene' found" problem is with fine granular bundling, OSGi classloaders, and Java's service loader. One way to solve it is the superbundle approach: putting the user application's activator and all required neo and lucene bundles/libs into a single bundle. Correct? So I took neo4j-osgi/bundle/pom.xml as an template for my application's pom, especially its bundle plugin configuration: !javax.transaction.*,!com.sun.*,!sun.misc.*,!org.junit.*,!junit.*,*; org.neo4j.*;version="1.4",* *;scope=compile|runtime true and added my application's activator: de.deepamehta.neo4j.Activator The activator's start() method is fairly simple: public void start(BundleContext context) { GraphDatabaseService neo4j = new EmbeddedGraphDatabase("test-db"); Index index = neo4j.index().forNodes("exact"); } But it throws: java.lang.IllegalArgumentException: No index provider 'lucene' found The bundle list looks fine (#1 is the super bundle): ID|State |Level|Name 0|Active |0|System Bundle (3.2.1) 1|Resolved |5|Neo4j OSGi Test (0.1.0) 2|Active |1|Apache Felix Gogo Command (0.8.0) 3|Active |1|Apache Felix Gogo Runtime (0.8.0) 4|Active |1|Apache Felix Gogo Shell (0.8.0) To let you reproduce this I packed a minimal test project here: https://github.com/jri/neo4j-osgi-test Run it: git clone git://github.com/jri/neo4j-osgi-test.git cd neo4j-osgi-test mvn clean install pax:run This uses pax runner to provision the super bundle in a Felix runtime. Deploying the super bundle manually in Felix makes no difference. Using the latest Maven bundle plugin (2.3.5 instead of 1.4) makes no difference (after tweaking the pom a little) and also getting rid of the bundle plugin's warnings (again by tweaking the pom) makes no difference. Who can help? Cheers, Jörg ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Thank you. It worked with "mvn -u clean install". Best regards, James 2011/7/21 Peter Neubauer : > So, > now, with another merge from Toni, you should be able to build > https://github.com/neo4j/neo4j-osgi with just > > mvn clean install > > Enjoy! > > 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 Thu, Jul 21, 2011 at 12:05 AM, Toni Menzel wrote: >> btw, sorry about the Tinybundles disruption. The group id "org.ops4j.pax" >> was actually wrong since ripping out tinybundles from pax swissbox. >> Actually there will be just one tinybundles artifact and it will carry 1.0 >> really soon. >> >> Until then you may grab latest artifacts from >> https://oss.sonatype.org/content/groups/ops4j/ . >> >> >> On Thu, Jul 21, 2011 at 12:00 AM, Peter Neubauer >> wrote: >>> >>> And, there was a bug in Pax Exam not shutting down the bundles >>> properly. Fixed by Toni Menzel in 5 minutes. Thanks! >>> >>> I added some build instructions to https://github.com/neo4j/neo4j-osgi >>> to get things working. Give it a try! >>> >>> 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 11:12 PM, Peter Neubauer >>> wrote: >>> > Ahh, >>> > sorry, seems Tinybundles changes groupId and API since my last pull. >>> > Pushed the updates. Please try again :) >>> > >>> > 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 9:39 PM, Jean-Pierre Bergamin >>> > wrote: >>> >> Hi Peter >>> >> >>> >> When I ran mvn install, I got: >>> >> ... >>> >> [WARNING] Warning building bundle >>> >> org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT >>> >> ... >>> >> [INFO] Installing >>> >> >>> >> org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar >>> >> >>> >> I think there is a "tinybundles" to much in between. :-) >>> >> >>> >> I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository >>> >> folder structue and at least the tinybundles jar can now be found in >>> >> the neo4j-osgi projects. >>> >> >>> >> I now have compilation errors in the examples project: >>> >> [ERROR] Failed to execute goal >>> >> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile >>> >> (default-testCompile) on project neo4j-osgi-examples: Compilatio >>> >> n failure: Compilation failure: >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >>> >> package org.ops4j.pax.tinybundles.core.builders does not exist >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >>> >> package org.ops4j.pax.tinybundles.core.builders does not exist >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >>> >> package org.ops4j.pax.tinybundles.core.builders does not exist >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >>> >> package org.ops4j.pax.tinybundles.core.builders does not exist >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] >>> >> cannot find symbol >>> >> [ERROR] symbol : class BndBuilder >>> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >>> >> [ERROR] >>> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] >>> >> cannot find symbol >>> >> [ERROR] symbol : class SynchronousRawBuilder >>> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >>> >> >>> >> And indeed, the org.ops4j.pax.tinybundles.core.buil
Re: [Neo4j] OSGi and Neo4j - superbundle approach
So, now, with another merge from Toni, you should be able to build https://github.com/neo4j/neo4j-osgi with just mvn clean install Enjoy! 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 Thu, Jul 21, 2011 at 12:05 AM, Toni Menzel wrote: > btw, sorry about the Tinybundles disruption. The group id "org.ops4j.pax" > was actually wrong since ripping out tinybundles from pax swissbox. > Actually there will be just one tinybundles artifact and it will carry 1.0 > really soon. > > Until then you may grab latest artifacts from > https://oss.sonatype.org/content/groups/ops4j/ . > > > On Thu, Jul 21, 2011 at 12:00 AM, Peter Neubauer > wrote: >> >> And, there was a bug in Pax Exam not shutting down the bundles >> properly. Fixed by Toni Menzel in 5 minutes. Thanks! >> >> I added some build instructions to https://github.com/neo4j/neo4j-osgi >> to get things working. Give it a try! >> >> 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 11:12 PM, Peter Neubauer >> wrote: >> > Ahh, >> > sorry, seems Tinybundles changes groupId and API since my last pull. >> > Pushed the updates. Please try again :) >> > >> > 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 9:39 PM, Jean-Pierre Bergamin >> > wrote: >> >> Hi Peter >> >> >> >> When I ran mvn install, I got: >> >> ... >> >> [WARNING] Warning building bundle >> >> org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT >> >> ... >> >> [INFO] Installing >> >> >> >> org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar >> >> >> >> I think there is a "tinybundles" to much in between. :-) >> >> >> >> I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository >> >> folder structue and at least the tinybundles jar can now be found in >> >> the neo4j-osgi projects. >> >> >> >> I now have compilation errors in the examples project: >> >> [ERROR] Failed to execute goal >> >> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile >> >> (default-testCompile) on project neo4j-osgi-examples: Compilatio >> >> n failure: Compilation failure: >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >> >> package org.ops4j.pax.tinybundles.core.builders does not exist >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >> >> package org.ops4j.pax.tinybundles.core.builders does not exist >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >> >> package org.ops4j.pax.tinybundles.core.builders does not exist >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >> >> package org.ops4j.pax.tinybundles.core.builders does not exist >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] >> >> cannot find symbol >> >> [ERROR] symbol : class BndBuilder >> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >> >> [ERROR] >> >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] >> >> cannot find symbol >> >> [ERROR] symbol : class SynchronousRawBuilder >> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >> >> >> >> And indeed, the org.ops4j.pax.tinybundles.core.builders package is not >> >> in the tinybundles jar I just built and installed, but only >> >> ..tinybundles.core and ..tinybundles.core.intern. Any ideas? >> >> >> >> >> >> Best regards, >> >> James >> >> >> >> 2011/7/20 Peter Neubauer : >> >>> Hi
Re: [Neo4j] OSGi and Neo4j - superbundle approach
btw, sorry about the Tinybundles disruption. The group id "org.ops4j.pax" was actually wrong since ripping out tinybundles from pax swissbox. Actually there will be just one tinybundles artifact and it will carry 1.0 really soon. Until then you may grab latest artifacts from https://oss.sonatype.org/content/groups/ops4j/ . On Thu, Jul 21, 2011 at 12:00 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > And, there was a bug in Pax Exam not shutting down the bundles > properly. Fixed by Toni Menzel in 5 minutes. Thanks! > > I added some build instructions to https://github.com/neo4j/neo4j-osgi > to get things working. Give it a try! > > 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 11:12 PM, Peter Neubauer > wrote: > > Ahh, > > sorry, seems Tinybundles changes groupId and API since my last pull. > > Pushed the updates. Please try again :) > > > > 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 9:39 PM, Jean-Pierre Bergamin > > wrote: > >> Hi Peter > >> > >> When I ran mvn install, I got: > >> ... > >> [WARNING] Warning building bundle > >> org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT > >> ... > >> [INFO] Installing > >> > org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar > >> > >> I think there is a "tinybundles" to much in between. :-) > >> > >> I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository > >> folder structue and at least the tinybundles jar can now be found in > >> the neo4j-osgi projects. > >> > >> I now have compilation errors in the examples project: > >> [ERROR] Failed to execute goal > >> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile > >> (default-testCompile) on project neo4j-osgi-examples: Compilatio > >> n failure: Compilation failure: > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] > >> package org.ops4j.pax.tinybundles.core.builders does not exist > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] > >> package org.ops4j.pax.tinybundles.core.builders does not exist > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] > >> package org.ops4j.pax.tinybundles.core.builders does not exist > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] > >> package org.ops4j.pax.tinybundles.core.builders does not exist > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] > >> cannot find symbol > >> [ERROR] symbol : class BndBuilder > >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest > >> [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] > >> cannot find symbol > >> [ERROR] symbol : class SynchronousRawBuilder > >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest > >> > >> And indeed, the org.ops4j.pax.tinybundles.core.builders package is not > >> in the tinybundles jar I just built and installed, but only > >> ..tinybundles.core and ..tinybundles.core.intern. Any ideas? > >> > >> > >> Best regards, > >> James > >> > >> 2011/7/20 Peter Neubauer : > >>> Hi Jean-Pierre, > >>> sorry for the inconvenience, the Tinybundles version is not yet > >>> released by the OPS4J team, so you can build it yourself from > >>> > >>> https://github.com/ops4j/org.ops4j.pax.tinybundles > >>> > >>> with > >>> > >>> mvn clean install > >>> > >>> Feedback is appreciated! > >>> > >>> 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. > >>>
Re: [Neo4j] OSGi and Neo4j - superbundle approach
And, there was a bug in Pax Exam not shutting down the bundles properly. Fixed by Toni Menzel in 5 minutes. Thanks! I added some build instructions to https://github.com/neo4j/neo4j-osgi to get things working. Give it a try! 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 11:12 PM, Peter Neubauer wrote: > Ahh, > sorry, seems Tinybundles changes groupId and API since my last pull. > Pushed the updates. Please try again :) > > 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 9:39 PM, Jean-Pierre Bergamin > wrote: >> Hi Peter >> >> When I ran mvn install, I got: >> ... >> [WARNING] Warning building bundle >> org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT >> ... >> [INFO] Installing >> org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar >> >> I think there is a "tinybundles" to much in between. :-) >> >> I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository >> folder structue and at least the tinybundles jar can now be found in >> the neo4j-osgi projects. >> >> I now have compilation errors in the examples project: >> [ERROR] Failed to execute goal >> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile >> (default-testCompile) on project neo4j-osgi-examples: Compilatio >> n failure: Compilation failure: >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >> package org.ops4j.pax.tinybundles.core.builders does not exist >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >> package org.ops4j.pax.tinybundles.core.builders does not exist >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] >> package org.ops4j.pax.tinybundles.core.builders does not exist >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] >> package org.ops4j.pax.tinybundles.core.builders does not exist >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] >> cannot find symbol >> [ERROR] symbol : class BndBuilder >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >> [ERROR] >> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] >> cannot find symbol >> [ERROR] symbol : class SynchronousRawBuilder >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest >> >> And indeed, the org.ops4j.pax.tinybundles.core.builders package is not >> in the tinybundles jar I just built and installed, but only >> ..tinybundles.core and ..tinybundles.core.intern. Any ideas? >> >> >> Best regards, >> James >> >> 2011/7/20 Peter Neubauer : >>> Hi Jean-Pierre, >>> sorry for the inconvenience, the Tinybundles version is not yet >>> released by the OPS4J team, so you can build it yourself from >>> >>> https://github.com/ops4j/org.ops4j.pax.tinybundles >>> >>> with >>> >>> mvn clean install >>> >>> Feedback is appreciated! >>> >>> 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 9:12 PM, Jean-Pierre Bergamin >>> wrote: Hello everyone May I chime in here... We are really interested to see neo4j working in an OSGi environment esp. together with Spring Data Graph. After an unsuccessful attempt to get it up and running a couple of weeks ago we gave it another chance today after seeing this post and after a whole day of debugging and fiddling around with manifests and template.mf and osgi.bnd we have - hurray - a running neo4j and Spring Data Graph setu
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Ahh, sorry, seems Tinybundles changes groupId and API since my last pull. Pushed the updates. Please try again :) 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 9:39 PM, Jean-Pierre Bergamin wrote: > Hi Peter > > When I ran mvn install, I got: > ... > [WARNING] Warning building bundle > org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT > ... > [INFO] Installing > org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar > > I think there is a "tinybundles" to much in between. :-) > > I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository > folder structue and at least the tinybundles jar can now be found in > the neo4j-osgi projects. > > I now have compilation errors in the examples project: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile > (default-testCompile) on project neo4j-osgi-examples: Compilatio > n failure: Compilation failure: > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] > package org.ops4j.pax.tinybundles.core.builders does not exist > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] > package org.ops4j.pax.tinybundles.core.builders does not exist > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] > package org.ops4j.pax.tinybundles.core.builders does not exist > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] > package org.ops4j.pax.tinybundles.core.builders does not exist > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] > cannot find symbol > [ERROR] symbol : class BndBuilder > [ERROR] location: class org.neo4j.examples.osgi.OSGiTest > [ERROR] > \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] > cannot find symbol > [ERROR] symbol : class SynchronousRawBuilder > [ERROR] location: class org.neo4j.examples.osgi.OSGiTest > > And indeed, the org.ops4j.pax.tinybundles.core.builders package is not > in the tinybundles jar I just built and installed, but only > ..tinybundles.core and ..tinybundles.core.intern. Any ideas? > > > Best regards, > James > > 2011/7/20 Peter Neubauer : >> Hi Jean-Pierre, >> sorry for the inconvenience, the Tinybundles version is not yet >> released by the OPS4J team, so you can build it yourself from >> >> https://github.com/ops4j/org.ops4j.pax.tinybundles >> >> with >> >> mvn clean install >> >> Feedback is appreciated! >> >> 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 9:12 PM, Jean-Pierre Bergamin >> wrote: >>> Hello everyone >>> >>> May I chime in here... >>> >>> We are really interested to see neo4j working in an OSGi environment >>> esp. together with Spring Data Graph. After an unsuccessful attempt to >>> get it up and running a couple of weeks ago we gave it another chance >>> today after seeing this post and after a whole day of debugging and >>> fiddling around with manifests and template.mf and osgi.bnd we have - >>> hurray - a running neo4j and Spring Data Graph setup in Virgo (based >>> on Equinox). >>> >>> Regarding the error with the missing lucene index Provider >>> (java.lang.IllegalArgumentException: No index provider 'lucene' found) >>> I also would like to refer to this "discussion" here: >>> https://github.com/neo4j/community/commit/e8574e96315999ab04e1b484717bb2b1a3dfa9be#commitcomment-483325 >>> I also had the "No index provider 'lucene' found" error with neo4j >>> 1.4. With 1.3, the workaround was to export the org.neo4j.index.impl >>> package, which is not working with 1.4. Instead I just registered an >>> instance of LuceneIndexProvider from the lucene-index bundle as a osgi >>> service. After doing this, this index provider can be found as an OSGi >>> service by the kernel. >>> We currently register this service within our application, which is >>> probaby not the righ
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Peter When I ran mvn install, I got: ... [WARNING] Warning building bundle org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT ... [INFO] Installing org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar I think there is a "tinybundles" to much in between. :-) I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository folder structue and at least the tinybundles jar can now be found in the neo4j-osgi projects. I now have compilation errors in the examples project: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project neo4j-osgi-examples: Compilatio n failure: Compilation failure: [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] package org.ops4j.pax.tinybundles.core.builders does not exist [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] package org.ops4j.pax.tinybundles.core.builders does not exist [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46] package org.ops4j.pax.tinybundles.core.builders does not exist [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46] package org.ops4j.pax.tinybundles.core.builders does not exist [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39] cannot find symbol [ERROR] symbol : class BndBuilder [ERROR] location: class org.neo4j.examples.osgi.OSGiTest [ERROR] \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55] cannot find symbol [ERROR] symbol : class SynchronousRawBuilder [ERROR] location: class org.neo4j.examples.osgi.OSGiTest And indeed, the org.ops4j.pax.tinybundles.core.builders package is not in the tinybundles jar I just built and installed, but only ..tinybundles.core and ..tinybundles.core.intern. Any ideas? Best regards, James 2011/7/20 Peter Neubauer : > Hi Jean-Pierre, > sorry for the inconvenience, the Tinybundles version is not yet > released by the OPS4J team, so you can build it yourself from > > https://github.com/ops4j/org.ops4j.pax.tinybundles > > with > > mvn clean install > > Feedback is appreciated! > > 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 9:12 PM, Jean-Pierre Bergamin > wrote: >> Hello everyone >> >> May I chime in here... >> >> We are really interested to see neo4j working in an OSGi environment >> esp. together with Spring Data Graph. After an unsuccessful attempt to >> get it up and running a couple of weeks ago we gave it another chance >> today after seeing this post and after a whole day of debugging and >> fiddling around with manifests and template.mf and osgi.bnd we have - >> hurray - a running neo4j and Spring Data Graph setup in Virgo (based >> on Equinox). >> >> Regarding the error with the missing lucene index Provider >> (java.lang.IllegalArgumentException: No index provider 'lucene' found) >> I also would like to refer to this "discussion" here: >> https://github.com/neo4j/community/commit/e8574e96315999ab04e1b484717bb2b1a3dfa9be#commitcomment-483325 >> I also had the "No index provider 'lucene' found" error with neo4j >> 1.4. With 1.3, the workaround was to export the org.neo4j.index.impl >> package, which is not working with 1.4. Instead I just registered an >> instance of LuceneIndexProvider from the lucene-index bundle as a osgi >> service. After doing this, this index provider can be found as an OSGi >> service by the kernel. >> We currently register this service within our application, which is >> probaby not the right solution. I think the lucene-index bundle should >> export the LuceneIndexProvider service itself, shouldn't it? >> >> I also tried to get your example up and running, but I have a missing >> dependency: "Failure to find >> org.ops4j.pax:tinybundles:jar:1.0.0-SNAPSHOT". Which snapshot >> repository does contain the tinybundles jar? >> >> >> Best regards, >> James >> >> >> 2011/7/20 Peter Neubauer : >>> Yup, >>> have pulled and can see it. Thanks! Will ask the Toni for a way to >>> cleanly shut down the framework so we can get both tests working. >>> >>> /peter >>> >>> On Mon, Jul 18, 2011 at 11:58 PM, Peter Neubauer >>> wrote: Nicolas, I am away for 2 days, will try it out after that. Thanks for chipping in! /peter
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Jean-Pierre, sorry for the inconvenience, the Tinybundles version is not yet released by the OPS4J team, so you can build it yourself from https://github.com/ops4j/org.ops4j.pax.tinybundles with mvn clean install Feedback is appreciated! 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 9:12 PM, Jean-Pierre Bergamin wrote: > Hello everyone > > May I chime in here... > > We are really interested to see neo4j working in an OSGi environment > esp. together with Spring Data Graph. After an unsuccessful attempt to > get it up and running a couple of weeks ago we gave it another chance > today after seeing this post and after a whole day of debugging and > fiddling around with manifests and template.mf and osgi.bnd we have - > hurray - a running neo4j and Spring Data Graph setup in Virgo (based > on Equinox). > > Regarding the error with the missing lucene index Provider > (java.lang.IllegalArgumentException: No index provider 'lucene' found) > I also would like to refer to this "discussion" here: > https://github.com/neo4j/community/commit/e8574e96315999ab04e1b484717bb2b1a3dfa9be#commitcomment-483325 > I also had the "No index provider 'lucene' found" error with neo4j > 1.4. With 1.3, the workaround was to export the org.neo4j.index.impl > package, which is not working with 1.4. Instead I just registered an > instance of LuceneIndexProvider from the lucene-index bundle as a osgi > service. After doing this, this index provider can be found as an OSGi > service by the kernel. > We currently register this service within our application, which is > probaby not the right solution. I think the lucene-index bundle should > export the LuceneIndexProvider service itself, shouldn't it? > > I also tried to get your example up and running, but I have a missing > dependency: "Failure to find > org.ops4j.pax:tinybundles:jar:1.0.0-SNAPSHOT". Which snapshot > repository does contain the tinybundles jar? > > > Best regards, > James > > > 2011/7/20 Peter Neubauer : >> Yup, >> have pulled and can see it. Thanks! Will ask the Toni for a way to >> cleanly shut down the framework so we can get both tests working. >> >> /peter >> >> On Mon, Jul 18, 2011 at 11:58 PM, Peter Neubauer >> wrote: >>> Nicolas, >>> I am away for 2 days, will try it out after that. Thanks for chipping in! >>> >>> /peter >>> >>> Sent from my phone. >>> >>> On Jul 18, 2011 9:43 PM, "Nicolas Jouanin" >>> wrote: Hi Peter, I've comited a new test case which work with a pre-built bundle. It currently fails because in OSGiTest class the first test case doesn't close the database, but if you remove the @Test before the first test case the second one will run and succeed. So the neo4j superbundle seems to work correctly, event if I don't know what's wrong when doing it by hand on the felix framework. This need more time to investigate. Don't hesitate to pull code if needed. Nicolas Le 17 juil. 2011 à 22:06, Peter Neubauer a écrit : > Nicolas, > the best would be to be able to emulate this in a test, too. Maybe > classloading issues? Maybe forking the PaxExam test will reproduce the > issue, or running you Felix setup as a testcase to trigger this? > > 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin > wrote: >> I've sent the CLA signup. >> The OSGiTest is working fine for me too. Problems come when taking the >> felix framework out of the box and deploying manually neo4j-osgi bundle >> with >> another bundle containing the same activator class. >> I made sure to deploy same bundles but I get >> java.lang.IllegalArgumentException: No index provider 'lucene' found when >> registring the IndexService. >> I think i miss a bundle which is created automatically by pax during the >> test case. May be lucene is missing. >> What do you think >> >> Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : >> >>> Hi Nicolas, >>> Have you been able to run >>> >>> https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/o
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hello everyone May I chime in here... We are really interested to see neo4j working in an OSGi environment esp. together with Spring Data Graph. After an unsuccessful attempt to get it up and running a couple of weeks ago we gave it another chance today after seeing this post and after a whole day of debugging and fiddling around with manifests and template.mf and osgi.bnd we have - hurray - a running neo4j and Spring Data Graph setup in Virgo (based on Equinox). Regarding the error with the missing lucene index Provider (java.lang.IllegalArgumentException: No index provider 'lucene' found) I also would like to refer to this "discussion" here: https://github.com/neo4j/community/commit/e8574e96315999ab04e1b484717bb2b1a3dfa9be#commitcomment-483325 I also had the "No index provider 'lucene' found" error with neo4j 1.4. With 1.3, the workaround was to export the org.neo4j.index.impl package, which is not working with 1.4. Instead I just registered an instance of LuceneIndexProvider from the lucene-index bundle as a osgi service. After doing this, this index provider can be found as an OSGi service by the kernel. We currently register this service within our application, which is probaby not the right solution. I think the lucene-index bundle should export the LuceneIndexProvider service itself, shouldn't it? I also tried to get your example up and running, but I have a missing dependency: "Failure to find org.ops4j.pax:tinybundles:jar:1.0.0-SNAPSHOT". Which snapshot repository does contain the tinybundles jar? Best regards, James 2011/7/20 Peter Neubauer : > Yup, > have pulled and can see it. Thanks! Will ask the Toni for a way to > cleanly shut down the framework so we can get both tests working. > > /peter > > On Mon, Jul 18, 2011 at 11:58 PM, Peter Neubauer > wrote: >> Nicolas, >> I am away for 2 days, will try it out after that. Thanks for chipping in! >> >> /peter >> >> Sent from my phone. >> >> On Jul 18, 2011 9:43 PM, "Nicolas Jouanin" >> wrote: >>> Hi Peter, >>> >>> I've comited a new test case which work with a pre-built bundle. >>> It currently fails because in OSGiTest class the first test case doesn't >>> close the database, but if you remove the @Test before the first test case >>> the second one will run and succeed. >>> So the neo4j superbundle seems to work correctly, event if I don't know >>> what's wrong when doing it by hand on the felix framework. This need more >>> time to investigate. >>> Don't hesitate to pull code if needed. >>> >>> Nicolas >>> >>> Le 17 juil. 2011 à 22:06, Peter Neubauer a écrit : >>> Nicolas, the best would be to be able to emulate this in a test, too. Maybe classloading issues? Maybe forking the PaxExam test will reproduce the issue, or running you Felix setup as a testcase to trigger this? 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin wrote: > I've sent the CLA signup. > The OSGiTest is working fine for me too. Problems come when taking the > felix framework out of the box and deploying manually neo4j-osgi bundle > with > another bundle containing the same activator class. > I made sure to deploy same bundles but I get > java.lang.IllegalArgumentException: No index provider 'lucene' found when > registring the IndexService. > I think i miss a bundle which is created automatically by pax during the > test case. May be lucene is missing. > What do you think > > Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : > >> Hi Nicolas, >> Have you been able to run >> >> https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java >> properly? It actually is running on Equinox, so let me try it with >> Felix ... back in a moment. >> >> Also, in order to pull your changes, could you sign up as a committer, >> and send a mail according to >> http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? >> >> >> 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 Sun, Jul 17, 2011 at 3:02 PM, Nicol
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Yup, have pulled and can see it. Thanks! Will ask the Toni for a way to cleanly shut down the framework so we can get both tests working. /peter On Mon, Jul 18, 2011 at 11:58 PM, Peter Neubauer wrote: > Nicolas, > I am away for 2 days, will try it out after that. Thanks for chipping in! > > /peter > > Sent from my phone. > > On Jul 18, 2011 9:43 PM, "Nicolas Jouanin" > wrote: >> Hi Peter, >> >> I've comited a new test case which work with a pre-built bundle. >> It currently fails because in OSGiTest class the first test case doesn't >> close the database, but if you remove the @Test before the first test case >> the second one will run and succeed. >> So the neo4j superbundle seems to work correctly, event if I don't know >> what's wrong when doing it by hand on the felix framework. This need more >> time to investigate. >> Don't hesitate to pull code if needed. >> >> Nicolas >> >> Le 17 juil. 2011 à 22:06, Peter Neubauer a écrit : >> >>> Nicolas, >>> the best would be to be able to emulate this in a test, too. Maybe >>> classloading issues? Maybe forking the PaxExam test will reproduce the >>> issue, or running you Felix setup as a testcase to trigger this? >>> >>> 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin >>> wrote: I've sent the CLA signup. The OSGiTest is working fine for me too. Problems come when taking the felix framework out of the box and deploying manually neo4j-osgi bundle with another bundle containing the same activator class. I made sure to deploy same bundles but I get java.lang.IllegalArgumentException: No index provider 'lucene' found when registring the IndexService. I think i miss a bundle which is created automatically by pax during the test case. May be lucene is missing. What do you think Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : > Hi Nicolas, > Have you been able to run > > https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java > properly? It actually is running on Equinox, so let me try it with > Felix ... back in a moment. > > Also, in order to pull your changes, could you sign up as a committer, > and send a mail according to > http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? > > > 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin > wrote: >> Hi Peter, >> >> Thanks for initiating this work on OSGi bundle. >> I've forked you repository and tried to make is work using this sample >> activator [1]. My goal is to make my activator work when deployed on >> Felix >> with the neo4j superbundle. >> First of all, I had troubles to mvn clean install the bundle module. >> maven-bundle-plugin is complaining about bundle.namespace property not >> set. >> I've fixed it. >> Then when deploying it on Felix I had an error saying that >> javax.transaction couldn't be imported. Because this package is already >> included in superbundle, I've removed it explicitally from the >> Import-Package directive. You can see the changes here [2]. >> Then I tried to make my bundle activated using felix and the following >> bundles installed : >> g! lb >> START LEVEL 1 >> ID|State |Level|Name >> 0|Active | 0|System Bundle (3.2.2) >> 1|Active | 1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) >> 2|Active | 1|Apache Felix Bundle Repository (1.6.2) >> 3|Active | 1|Apache Felix Gogo Command (0.8.0) >> 4|Active | 1|Apache Felix Gogo Runtime (0.8.0) >> 5|Active | 1|Apache Felix Gogo Shell (0.8.0) >> 6|Resolved | 1|EscapeK - Neo4j OSGi how-to - Embedded client >> (0.0.1.SNAPSHOT) >> There are only felix core, neo4j superbundle and my test bundle. >> So when starting felix I get the following trace : >> >> Welcome to Apache Felix Gogo >> >> g! Opening database in embedded mode: 17 juil. 2011 14:57:08 >> org.neo4j.kernel.impl.transaction.xaframework.X
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Nicolas, I am away for 2 days, will try it out after that. Thanks for chipping in! /peter Sent from my phone. On Jul 18, 2011 9:43 PM, "Nicolas Jouanin" wrote: > Hi Peter, > > I've comited a new test case which work with a pre-built bundle. > It currently fails because in OSGiTest class the first test case doesn't close the database, but if you remove the @Test before the first test case the second one will run and succeed. > So the neo4j superbundle seems to work correctly, event if I don't know what's wrong when doing it by hand on the felix framework. This need more time to investigate. > Don't hesitate to pull code if needed. > > Nicolas > > Le 17 juil. 2011 à 22:06, Peter Neubauer a écrit : > >> Nicolas, >> the best would be to be able to emulate this in a test, too. Maybe >> classloading issues? Maybe forking the PaxExam test will reproduce the >> issue, or running you Felix setup as a testcase to trigger this? >> >> 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin >> wrote: >>> I've sent the CLA signup. >>> The OSGiTest is working fine for me too. Problems come when taking the felix framework out of the box and deploying manually neo4j-osgi bundle with another bundle containing the same activator class. >>> I made sure to deploy same bundles but I get java.lang.IllegalArgumentException: No index provider 'lucene' found when registring the IndexService. >>> I think i miss a bundle which is created automatically by pax during the test case. May be lucene is missing. >>> What do you think >>> >>> Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : >>> Hi Nicolas, Have you been able to run https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java properly? It actually is running on Equinox, so let me try it with Felix ... back in a moment. Also, in order to pull your changes, could you sign up as a committer, and send a mail according to http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin wrote: > Hi Peter, > > Thanks for initiating this work on OSGi bundle. > I've forked you repository and tried to make is work using this sample activator [1]. My goal is to make my activator work when deployed on Felix with the neo4j superbundle. > First of all, I had troubles to mvn clean install the bundle module. maven-bundle-plugin is complaining about bundle.namespace property not set. I've fixed it. > Then when deploying it on Felix I had an error saying that javax.transaction couldn't be imported. Because this package is already included in superbundle, I've removed it explicitally from the Import-Package directive. You can see the changes here [2]. > Then I tried to make my bundle activated using felix and the following bundles installed : > g! lb > START LEVEL 1 > ID|State |Level|Name > 0|Active | 0|System Bundle (3.2.2) > 1|Active | 1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) > 2|Active | 1|Apache Felix Bundle Repository (1.6.2) > 3|Active | 1|Apache Felix Gogo Command (0.8.0) > 4|Active | 1|Apache Felix Gogo Runtime (0.8.0) > 5|Active | 1|Apache Felix Gogo Shell (0.8.0) > 6|Resolved | 1|EscapeK - Neo4j OSGi how-to - Embedded client (0.0.1.SNAPSHOT) > There are only felix core, neo4j superbundle and my test bundle. > So when starting felix I get the following trace : > > Welcome to Apache Felix Gogo > > g! Opening database in embedded mode: 17 juil. 2011 14:57:08 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery > INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. Recovery started ... > OK > Populating it ... OK > Hello, brave Neo4j world! > ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error starting file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Activator start
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Peter, I've comited a new test case which work with a pre-built bundle. It currently fails because in OSGiTest class the first test case doesn't close the database, but if you remove the @Test before the first test case the second one will run and succeed. So the neo4j superbundle seems to work correctly, event if I don't know what's wrong when doing it by hand on the felix framework. This need more time to investigate. Don't hesitate to pull code if needed. Nicolas Le 17 juil. 2011 à 22:06, Peter Neubauer a écrit : > Nicolas, > the best would be to be able to emulate this in a test, too. Maybe > classloading issues? Maybe forking the PaxExam test will reproduce the > issue, or running you Felix setup as a testcase to trigger this? > > 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin > wrote: >> I've sent the CLA signup. >> The OSGiTest is working fine for me too. Problems come when taking the felix >> framework out of the box and deploying manually neo4j-osgi bundle with >> another bundle containing the same activator class. >> I made sure to deploy same bundles but I get >> java.lang.IllegalArgumentException: No index provider 'lucene' found when >> registring the IndexService. >> I think i miss a bundle which is created automatically by pax during the >> test case. May be lucene is missing. >> What do you think >> >> Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : >> >>> Hi Nicolas, >>> Have you been able to run >>> https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java >>> properly? It actually is running on Equinox, so let me try it with >>> Felix ... back in a moment. >>> >>> Also, in order to pull your changes, could you sign up as a committer, >>> and send a mail according to >>> http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? >>> >>> >>> 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin >>> wrote: Hi Peter, Thanks for initiating this work on OSGi bundle. I've forked you repository and tried to make is work using this sample activator [1]. My goal is to make my activator work when deployed on Felix with the neo4j superbundle. First of all, I had troubles to mvn clean install the bundle module. maven-bundle-plugin is complaining about bundle.namespace property not set. I've fixed it. Then when deploying it on Felix I had an error saying that javax.transaction couldn't be imported. Because this package is already included in superbundle, I've removed it explicitally from the Import-Package directive. You can see the changes here [2]. Then I tried to make my bundle activated using felix and the following bundles installed : g! lb START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (3.2.2) 1|Active |1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) 2|Active |1|Apache Felix Bundle Repository (1.6.2) 3|Active |1|Apache Felix Gogo Command (0.8.0) 4|Active |1|Apache Felix Gogo Runtime (0.8.0) 5|Active |1|Apache Felix Gogo Shell (0.8.0) 6|Resolved |1|EscapeK - Neo4j OSGi how-to - Embedded client (0.0.1.SNAPSHOT) There are only felix core, neo4j superbundle and my test bundle. So when starting felix I get the following trace : Welcome to Apache Felix Gogo g! Opening database in embedded mode: 17 juil. 2011 14:57:08 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. Recovery started ... OK Populating it ... OK Hello, brave Neo4j world! ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error starting file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar (org.osgi.framework.BundleExc
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Nicolas, the best would be to be able to emulate this in a test, too. Maybe classloading issues? Maybe forking the PaxExam test will reproduce the issue, or running you Felix setup as a testcase to trigger this? 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 Sun, Jul 17, 2011 at 9:21 PM, Nicolas Jouanin wrote: > I've sent the CLA signup. > The OSGiTest is working fine for me too. Problems come when taking the felix > framework out of the box and deploying manually neo4j-osgi bundle with > another bundle containing the same activator class. > I made sure to deploy same bundles but I get > java.lang.IllegalArgumentException: No index provider 'lucene' found when > registring the IndexService. > I think i miss a bundle which is created automatically by pax during the test > case. May be lucene is missing. > What do you think > > Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : > >> Hi Nicolas, >> Have you been able to run >> https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java >> properly? It actually is running on Equinox, so let me try it with >> Felix ... back in a moment. >> >> Also, in order to pull your changes, could you sign up as a committer, >> and send a mail according to >> http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? >> >> >> 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin >> wrote: >>> Hi Peter, >>> >>> Thanks for initiating this work on OSGi bundle. >>> I've forked you repository and tried to make is work using this sample >>> activator [1]. My goal is to make my activator work when deployed on Felix >>> with the neo4j superbundle. >>> First of all, I had troubles to mvn clean install the bundle module. >>> maven-bundle-plugin is complaining about bundle.namespace property not set. >>> I've fixed it. >>> Then when deploying it on Felix I had an error saying that >>> javax.transaction couldn't be imported. Because this package is already >>> included in superbundle, I've removed it explicitally from the >>> Import-Package directive. You can see the changes here [2]. >>> Then I tried to make my bundle activated using felix and the following >>> bundles installed : >>> g! lb >>> START LEVEL 1 >>> ID|State |Level|Name >>> 0|Active | 0|System Bundle (3.2.2) >>> 1|Active | 1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) >>> 2|Active | 1|Apache Felix Bundle Repository (1.6.2) >>> 3|Active | 1|Apache Felix Gogo Command (0.8.0) >>> 4|Active | 1|Apache Felix Gogo Runtime (0.8.0) >>> 5|Active | 1|Apache Felix Gogo Shell (0.8.0) >>> 6|Resolved | 1|EscapeK - Neo4j OSGi how-to - Embedded client >>> (0.0.1.SNAPSHOT) >>> There are only felix core, neo4j superbundle and my test bundle. >>> So when starting felix I get the following trace : >>> >>> Welcome to Apache Felix Gogo >>> >>> g! Opening database in embedded mode: 17 juil. 2011 14:57:08 >>> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog >>> doInternalRecovery >>> INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. >>> Recovery started ... >>> OK >>> Populating it ... OK >>> Hello, brave Neo4j world! >>> ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error >>> starting >>> file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar >>> (org.osgi.framework.BundleException: Activator start error in bundle >>> org.escapek.neo4j-osgi-howto.embedded-client [6].) >>> 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.n
Re: [Neo4j] OSGi and Neo4j - superbundle approach
I've sent the CLA signup. The OSGiTest is working fine for me too. Problems come when taking the felix framework out of the box and deploying manually neo4j-osgi bundle with another bundle containing the same activator class. I made sure to deploy same bundles but I get java.lang.IllegalArgumentException: No index provider 'lucene' found when registring the IndexService. I think i miss a bundle which is created automatically by pax during the test case. May be lucene is missing. What do you think Le 17 juil. 2011 à 17:33, Peter Neubauer a écrit : > Hi Nicolas, > Have you been able to run > https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java > properly? It actually is running on Equinox, so let me try it with > Felix ... back in a moment. > > Also, in order to pull your changes, could you sign up as a committer, > and send a mail according to > http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? > > > 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin > wrote: >> Hi Peter, >> >> Thanks for initiating this work on OSGi bundle. >> I've forked you repository and tried to make is work using this sample >> activator [1]. My goal is to make my activator work when deployed on Felix >> with the neo4j superbundle. >> First of all, I had troubles to mvn clean install the bundle module. >> maven-bundle-plugin is complaining about bundle.namespace property not set. >> I've fixed it. >> Then when deploying it on Felix I had an error saying that javax.transaction >> couldn't be imported. Because this package is already included in >> superbundle, I've removed it explicitally from the Import-Package directive. >> You can see the changes here [2]. >> Then I tried to make my bundle activated using felix and the following >> bundles installed : >> g! lb >> START LEVEL 1 >> ID|State |Level|Name >>0|Active |0|System Bundle (3.2.2) >>1|Active |1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) >>2|Active |1|Apache Felix Bundle Repository (1.6.2) >>3|Active |1|Apache Felix Gogo Command (0.8.0) >>4|Active |1|Apache Felix Gogo Runtime (0.8.0) >>5|Active |1|Apache Felix Gogo Shell (0.8.0) >>6|Resolved |1|EscapeK - Neo4j OSGi how-to - Embedded client >> (0.0.1.SNAPSHOT) >> There are only felix core, neo4j superbundle and my test bundle. >> So when starting felix I get the following trace : >> >> Welcome to Apache Felix Gogo >> >> g! Opening database in embedded mode: 17 juil. 2011 14:57:08 >> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery >> INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. >> Recovery started ... >> OK >> Populating it ... OK >> Hello, brave Neo4j world! >> ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error >> starting >> file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar >> (org.osgi.framework.BundleException: Activator start error in bundle >> org.escapek.neo4j-osgi-howto.embedded-client [6].) >> 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.escapek.neo4jOsgiHowto.embeddedClient.EmbeddedClientActivator.start(EmbeddedClientActivator.java:65) >>at >> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629) >>at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904) >>at org.apache.felix.framework.Felix.startBundle(Felix.java:1822) >>at >> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) >>at >> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) >>at java.lang.Thread.run(Thread.java:680) >> >> So everything works fine (open database, populate it and register service) >> until the activator tries to register I
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Nicolas, just pushed some more initialization along your lines, and have the test running with the output: [~/code/neo/neo4j-osgi/examples] $mvn clean test [INFO] Scanning for projects... [INFO] [INFO] Building Neo4j OSGi examples [INFO]task-segment: [clean, test] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting /Users/peterneubauer/code/neo/neo4j-osgi/examples/target [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [WARNING] POM for 'biz.aQute:bndlib:pom:1.15.0:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [INFO] [enforcer:enforce {execution: enforce-maven}] [INFO] [license:check {execution: check-licenses}] [INFO] Checking licenses... [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/peterneubauer/code/neo/neo4j-osgi/examples/src/main/resources [INFO] skip non existing resourceDirectory /Users/peterneubauer/code/neo/neo4j-osgi/examples/src/main/resources/META-INF [INFO] Copying 0 resource to META-INF [INFO] [compiler:compile {execution: default-compile}] [INFO] No sources to compile [INFO] [bundle:manifest {execution: bundle-manifest}] [WARNING] Warning in manifest for org.neo4j.examples:neo4j-osgi-examples:jar:0.1-SNAPSHOT : Superfluous export-package instructions: [null.*] [WARNING] Warning in manifest for org.neo4j.examples:neo4j-osgi-examples:jar:0.1-SNAPSHOT : Did not find matching referal for * [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/peterneubauer/code/neo/neo4j-osgi/examples/src/test/resources [INFO] Copying 0 resource to META-INF [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 3 source files to /Users/peterneubauer/code/neo/neo4j-osgi/examples/target/test-classes [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /Users/peterneubauer/code/neo/neo4j-osgi/examples/target/surefire-reports --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 300 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as /Users/peterneubauer/.m2/repository/org/ops4j/pax/exam/pax-exam-container-rbc/2.1.0/pax-exam-container-rbc-2.1.0.jar Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as /Users/peterneubauer/.m2/repository/org/ops4j/pax/exam/pax-exam-extender-service/2.1.0/pax-exam-extender-service-2.1.0.jar Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.osgi:org.osgi.compendium:jar:4.2.0) as /Users/peterneubauer/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-api:jar:1.6.2) as /Users/peterneubauer/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.6.2/pax-logging-api-1.6.2.jar Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-service:jar:1.6.2) as /Users/peterneubauer/.m2/repository/org/ops4j/pax/logging/pax-logging-service/1.6.2/pax-logging-service-1.6.2.jar Jul 17, 2011 5:52:07 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.neo4j:neo4j-osgi-bundle:jar:0.1-SNAPSHOT) as /Users/peterneubauer/.m2/repository/org/neo4j/neo4j-osgi-bundle/0.1-SNAPSHOT/neo4j-osgi-bundle-0.1-SNAPSHOT.jar [org.ops4j.pax.exam.rbc.internal.Activator] : Name, port or host is null. So this RBC remains inactive. org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling SLF4J API support. org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Jakarta Commons Logging API support. org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Log4J API support. org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling Avalon Logger API support. org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.logging.internal.Activator] : Enabling JULI Logger API support. [Framework Event Dispatcher] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED [Framework Event
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Nicolas, Have you been able to run https://github.com/njouanin/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java properly? It actually is running on Equinox, so let me try it with Felix ... back in a moment. Also, in order to pull your changes, could you sign up as a committer, and send a mail according to http://wiki.neo4j.org/content/About_Contributor_License_Agreement ? 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 Sun, Jul 17, 2011 at 3:02 PM, Nicolas Jouanin wrote: > Hi Peter, > > Thanks for initiating this work on OSGi bundle. > I've forked you repository and tried to make is work using this sample > activator [1]. My goal is to make my activator work when deployed on Felix > with the neo4j superbundle. > First of all, I had troubles to mvn clean install the bundle module. > maven-bundle-plugin is complaining about bundle.namespace property not set. > I've fixed it. > Then when deploying it on Felix I had an error saying that javax.transaction > couldn't be imported. Because this package is already included in > superbundle, I've removed it explicitally from the Import-Package directive. > You can see the changes here [2]. > Then I tried to make my bundle activated using felix and the following > bundles installed : > g! lb > START LEVEL 1 > ID|State |Level|Name > 0|Active | 0|System Bundle (3.2.2) > 1|Active | 1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) > 2|Active | 1|Apache Felix Bundle Repository (1.6.2) > 3|Active | 1|Apache Felix Gogo Command (0.8.0) > 4|Active | 1|Apache Felix Gogo Runtime (0.8.0) > 5|Active | 1|Apache Felix Gogo Shell (0.8.0) > 6|Resolved | 1|EscapeK - Neo4j OSGi how-to - Embedded client > (0.0.1.SNAPSHOT) > There are only felix core, neo4j superbundle and my test bundle. > So when starting felix I get the following trace : > > Welcome to Apache Felix Gogo > > g! Opening database in embedded mode: 17 juil. 2011 14:57:08 > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery > INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. > Recovery started ... > OK > Populating it ... OK > Hello, brave Neo4j world! > ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error starting > file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar > (org.osgi.framework.BundleException: Activator start error in bundle > org.escapek.neo4j-osgi-howto.embedded-client [6].) > 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.escapek.neo4jOsgiHowto.embeddedClient.EmbeddedClientActivator.start(EmbeddedClientActivator.java:65) > at > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629) > at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1822) > at > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) > at > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) > at java.lang.Thread.run(Thread.java:680) > > So everything works fine (open database, populate it and register service) > until the activator tries to register IndexProvider service. I then get the > previous exception which reminds me of something ... > > May be you can have a look at the stack trace to look for the error cause. > > NJ > > > [1] - > https://github.com/njouanin/neo4j-osgi-howto/blob/master/embedded-client/src/main/java/org/escapek/neo4jOsgiHowto/embeddedClient/EmbeddedClientActivator.java > [2] - > https://github.com/njouanin/neo4j-osgi/commit/4ec3eaf58b514d806fde3e48dd942c00fdfddf70 > > Le 5 juil. 2011 à 22:41, Peter Neubauer a écrit : > >> Hi all, >> I just pushed an initial working bundle-build to >> https://github.com/neo4j/neo4j-osgi. You can see the working test in >> https://github.com/neo4j/neo4j-osgi/blob/master/exa
Re: [Neo4j] OSGi and Neo4j - superbundle approach
Hi Peter, Thanks for initiating this work on OSGi bundle. I've forked you repository and tried to make is work using this sample activator [1]. My goal is to make my activator work when deployed on Felix with the neo4j superbundle. First of all, I had troubles to mvn clean install the bundle module. maven-bundle-plugin is complaining about bundle.namespace property not set. I've fixed it. Then when deploying it on Felix I had an error saying that javax.transaction couldn't be imported. Because this package is already included in superbundle, I've removed it explicitally from the Import-Package directive. You can see the changes here [2]. Then I tried to make my bundle activated using felix and the following bundles installed : g! lb START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (3.2.2) 1|Active |1|Neo4j OSGi default bundle (0.1.0.SNAPSHOT) 2|Active |1|Apache Felix Bundle Repository (1.6.2) 3|Active |1|Apache Felix Gogo Command (0.8.0) 4|Active |1|Apache Felix Gogo Runtime (0.8.0) 5|Active |1|Apache Felix Gogo Shell (0.8.0) 6|Resolved |1|EscapeK - Neo4j OSGi how-to - Embedded client (0.0.1.SNAPSHOT) There are only felix core, neo4j superbundle and my test bundle. So when starting felix I get the following trace : Welcome to Apache Felix Gogo g! Opening database in embedded mode: 17 juil. 2011 14:57:08 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [graphdb/nioneo_logical.log.1]. Recovery started ... OK Populating it ... OK Hello, brave Neo4j world! ERROR: Bundle org.escapek.neo4j-osgi-howto.embedded-client [6] Error starting file:/Users/nico/Dev/felix-framework-3.2.2/bundle/org.escapek.neo4j-osgi-howto.embedded-client_0.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Activator start error in bundle org.escapek.neo4j-osgi-howto.embedded-client [6].) 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.escapek.neo4jOsgiHowto.embeddedClient.EmbeddedClientActivator.start(EmbeddedClientActivator.java:65) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904) at org.apache.felix.framework.Felix.startBundle(Felix.java:1822) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:680) So everything works fine (open database, populate it and register service) until the activator tries to register IndexProvider service. I then get the previous exception which reminds me of something ... May be you can have a look at the stack trace to look for the error cause. NJ [1] - https://github.com/njouanin/neo4j-osgi-howto/blob/master/embedded-client/src/main/java/org/escapek/neo4jOsgiHowto/embeddedClient/EmbeddedClientActivator.java [2] - https://github.com/njouanin/neo4j-osgi/commit/4ec3eaf58b514d806fde3e48dd942c00fdfddf70 Le 5 juil. 2011 à 22:41, Peter Neubauer a écrit : > Hi all, > I just pushed an initial working bundle-build to > https://github.com/neo4j/neo4j-osgi. You can see the working test in > https://github.com/neo4j/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java > that waits for the Activator to instantiate and register a > GraphDatabaseService and a LuceneIndex. > > This should be tweaked, but maybe you can use the bundle project > https://github.com/neo4j/neo4j-osgi/blob/master/bundle/pom.xml , which > is just one pom.xml, as a blueprint for your OSGi environment Neo4j > bundle. > > Right now JTA and others are drawn into the bundle, which might be too > much, but I think you get the picture. > > This works even with the Java Service Loader architecture. Feel free > to fork and tune the bundles exports, and add more tests to it. > > WDYT? > > 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://w
[Neo4j] OSGi and Neo4j - superbundle approach
Hi all, I just pushed an initial working bundle-build to https://github.com/neo4j/neo4j-osgi. You can see the working test in https://github.com/neo4j/neo4j-osgi/blob/master/examples/src/test/java/org/neo4j/examples/osgi/OSGiTest.java that waits for the Activator to instantiate and register a GraphDatabaseService and a LuceneIndex. This should be tweaked, but maybe you can use the bundle project https://github.com/neo4j/neo4j-osgi/blob/master/bundle/pom.xml , which is just one pom.xml, as a blueprint for your OSGi environment Neo4j bundle. Right now JTA and others are drawn into the bundle, which might be too much, but I think you get the picture. This works even with the Java Service Loader architecture. Feel free to fork and tune the bundles exports, and add more tests to it. WDYT? 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. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user