Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Yes, that's what I managed to do : remaned master to a new branch then checkout upstream/master in local master. Thanks. 2011/6/15 Peter Neubauer peter.neuba...@neotechnology.com Nicolas, I think you could just make another branch, or rename the master branch to something else. Then, you could set up a new master and let it track the original master? 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 Tue, Jun 14, 2011 at 10:12 PM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi Peter (and others), May be you can help me with github... I'dl like to work on this superbundle using the last version of neo4j-community. The problem is that i've already forked this repo for my previous work and now I can't fork it anymore. Also, i've made my modifications on the master branch. Do you know a way of getting the last version of the source code without loosing my previous work ? I was thinking of checking out back to the time I've forked, then create a branch, then pull changes from the original repo. Thx. Le 14 juin 2011 à 09:03, Peter Neubauer a écrit : Nicolas, yes, after looking into the details involved, I think an official superbundle with the core Neo4j components bundled and exported woudl be the best way forward. Also, it would expose less granular bundles into an OSGi environment. Other IndexProviders etc could be then inserted as fragments into that bundle. It would be absolutely fantastic if you could work on that, maybe using the neo4j-osgi-examples as the demo project? We could then have a packaging project there or in a neo4j-osgi component that does the actual production of the superbundle. 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. On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi Peter, As shown below, exporting the implementation package is enough to make the IndexProvider registered as OSGi service (see first line of dump). Now an exception comes later when registering the index. I guess this come from the fact that you register a service of class IndexProvider whereas db.index().forNodes() returns an instance of Index. [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel: attempting to load extensions of type org.neo4j.graphdb.index.IndexProvider Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent UNREGISTERING [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR org.osgi.framework.BundleException: Exception in org.neo4j.examples.osgi.Neo4jActivator.start() of bundle BuildByTinyBundlestinybundles904955895969775UID. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) at
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
I'll work on this then and i'll let you know in the coming days. 2011/6/14 Peter Neubauer peter.neuba...@neotechnology.com Nicolas, yes, after looking into the details involved, I think an official superbundle with the core Neo4j components bundled and exported woudl be the best way forward. Also, it would expose less granular bundles into an OSGi environment. Other IndexProviders etc could be then inserted as fragments into that bundle. It would be absolutely fantastic if you could work on that, maybe using the neo4j-osgi-examples as the demo project? We could then have a packaging project there or in a neo4j-osgi component that does the actual production of the superbundle. 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. On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi Peter, As shown below, exporting the implementation package is enough to make the IndexProvider registered as OSGi service (see first line of dump). Now an exception comes later when registering the index. I guess this come from the fact that you register a service of class IndexProvider whereas db.index().forNodes() returns an instance of Index. [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel: attempting to load extensions of type org.neo4j.graphdb.index.IndexProvider Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent UNREGISTERING [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR org.osgi.framework.BundleException: Exception in org.neo4j.examples.osgi.Neo4jActivator.start() of bundle BuildByTinyBundlestinybundles904955895969775UID. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) Caused by: java.lang.IllegalArgumentException: The service object is not an instance of the service class org.neo4j.graphdb.index.IndexProvider at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.neo4j.examples.osgi.Neo4jActivator.start(Neo4jActivator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) ... 11 more Just by modifying the test case to register an Index the test now succed : serviceRegistration =
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Hi Peter (and others), May be you can help me with github... I'dl like to work on this superbundle using the last version of neo4j-community. The problem is that i've already forked this repo for my previous work and now I can't fork it anymore. Also, i've made my modifications on the master branch. Do you know a way of getting the last version of the source code without loosing my previous work ? I was thinking of checking out back to the time I've forked, then create a branch, then pull changes from the original repo. Thx. Le 14 juin 2011 à 09:03, Peter Neubauer a écrit : Nicolas, yes, after looking into the details involved, I think an official superbundle with the core Neo4j components bundled and exported woudl be the best way forward. Also, it would expose less granular bundles into an OSGi environment. Other IndexProviders etc could be then inserted as fragments into that bundle. It would be absolutely fantastic if you could work on that, maybe using the neo4j-osgi-examples as the demo project? We could then have a packaging project there or in a neo4j-osgi component that does the actual production of the superbundle. 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. On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi Peter, As shown below, exporting the implementation package is enough to make the IndexProvider registered as OSGi service (see first line of dump). Now an exception comes later when registering the index. I guess this come from the fact that you register a service of class IndexProvider whereas db.index().forNodes() returns an instance of Index. [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel: attempting to load extensions of type org.neo4j.graphdb.index.IndexProvider Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent UNREGISTERING [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR org.osgi.framework.BundleException: Exception in org.neo4j.examples.osgi.Neo4jActivator.start() of bundle BuildByTinyBundlestinybundles904955895969775UID. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) Caused by: java.lang.IllegalArgumentException: The service object is not an instance of the service class org.neo4j.graphdb.index.IndexProvider at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Nicolas, thanks for looking into this! If you only move the LuceneDataSource into an exported package, for instance org.neo4j.index.lucene, and export it, would that be sufficient to get the registration done? I don't want to force OSGi upon all Index provider bundles (yet) and keep the impact of making this work at a minimum. 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, Jun 11, 2011 at 10:21 PM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi Peter, I've tried to run your test case on my forked version. First of all, I got a Framework exception when running the test case out of the box : [Framework Event Dispatcher] DEBUG wrap_mvn_org.apache.lucene_lucene-core_3.1.0 - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - FrameworkEvent ERROR org.osgi.framework.BundleException: The bundle org.neo4j.lucene-index_1.4.0.SNAPSHOT [9] could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.lucene.analysis; version=3.0.0 This shows the lucene-index bundle has a unresolved imported package. That strange because lucene-core is deployed wrapped into a bundle just before. There may be a problem with the wrapping process... So, i changed the test case to use org.apache.servicemix.bundles.lucene:3.0.3_1, which is a bundled version of lucene 3.0.3 that i've been using during my forking tests. Using this bundle version and my forked bundles, I get the execution trace shown below. The test case still fails, but somewhere else. Let me explain: To manage services loaded using JDK service feature from other bundles, my forked version automatically registers declared JDK services as OSGi services. This is done is the OSGiExtensionLoader.registerBundleServices method (https://github.com/njouanin/community/blob/master/kernel/src/main/java/org/neo4j/kernel/impl/osgi/OSGiExtensionLoader.java). So, using my forked version, the LuceneIndexProvider is being exposed as OSGi service, so it is visible to OSGi loader and org.neo4j.kernel.IndexManagerImpl.getIndexProvider shouldn't throw IllegalArgumentException anymore. BUT, as shown below, i know have a exception during datasource initialisation. The LuceneDataSource class is not visible to the kernel bundle, where service registration occurs. So I see two possible solution for this : - change lucene-index bundle to export-package org.neo4j.index.impl.lucene (bad solution) - add a bundle activator in lucene-index bundle to register LuceneIndexProvider service on bundle startup, but I don't know its dependencies. Let me know if my analysis is not clear for you ... PS : changes made to the test case have been comited to git://github.com/njouanin/neo4j-osgi-examples.git [Framework Event Dispatcher] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED activating null null [Framework Event Dispatcher] DEBUG com.springsource.javax.transaction - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.kernel - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.kernel - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.kernel: Service org.neo4j.kernel.impl.transaction.TransactionManagerProvider registered with implementation org.neo4j.kernel.impl.transaction.TransactionManagerProvider[native] [Framework Event Dispatcher] WARN org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Implementation class org.neo4j.kernel.impl.management.JmxExtension not found by classloader Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Framework Event Dispatcher] DEBUG org.neo4j.kernel - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.kernel: Service org.neo4j.kernel.Version registered with implementation Neo4j - Graph Database Kernel 1.4-SNAPSHOT (revision: 1.4.M01-32-g51e2494-dirty) [Framework Event Dispatcher] DEBUG org.apache.servicemix.bundles.lucene - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel:
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Hi Peter, As shown below, exporting the implementation package is enough to make the IndexProvider registered as OSGi service (see first line of dump). Now an exception comes later when registering the index. I guess this come from the fact that you register a service of class IndexProvider whereas db.index().forNodes() returns an instance of Index. [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel: attempting to load extensions of type org.neo4j.graphdb.index.IndexProvider Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED [Start Level Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent UNREGISTERING [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR org.osgi.framework.BundleException: Exception in org.neo4j.examples.osgi.Neo4jActivator.start() of bundle BuildByTinyBundlestinybundles904955895969775UID. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) Caused by: java.lang.IllegalArgumentException: The service object is not an instance of the service class org.neo4j.graphdb.index.IndexProvider at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.neo4j.examples.osgi.Neo4jActivator.start(Neo4jActivator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) ... 11 more Just by modifying the test case to register an Index the test now succed : serviceRegistration = context.registerService( Index.class.getName(), db.index().forNodes( nodes ), new Properties() ); (see result below. So, after all, that make a lot of modifications for OSGi support ... I guess the easiest solution would be to create a super-bundle which would encapsulates all the actual bundles in only one. This would fix export/import package problem, and there could be a specific activator for this bundle to register services and OSGi stuff. Let me know if this solution would be acceptable, so may be I could work on this. --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 263 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. 13 juin 2011 11:04:37 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as /Users/nico/.m2/repository/org/ops4j/pax/exam/pax-exam-container-rbc/2.1.0/pax-exam-container-rbc-2.1.0.jar 13 juin 2011 11:04:37 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Hi Peter, I've tried to run your test case on my forked version. First of all, I got a Framework exception when running the test case out of the box : [Framework Event Dispatcher] DEBUG wrap_mvn_org.apache.lucene_lucene-core_3.1.0 - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - FrameworkEvent ERROR org.osgi.framework.BundleException: The bundle org.neo4j.lucene-index_1.4.0.SNAPSHOT [9] could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.lucene.analysis; version=3.0.0 This shows the lucene-index bundle has a unresolved imported package. That strange because lucene-core is deployed wrapped into a bundle just before. There may be a problem with the wrapping process... So, i changed the test case to use org.apache.servicemix.bundles.lucene:3.0.3_1, which is a bundled version of lucene 3.0.3 that i've been using during my forking tests. Using this bundle version and my forked bundles, I get the execution trace shown below. The test case still fails, but somewhere else. Let me explain: To manage services loaded using JDK service feature from other bundles, my forked version automatically registers declared JDK services as OSGi services. This is done is the OSGiExtensionLoader.registerBundleServices method (https://github.com/njouanin/community/blob/master/kernel/src/main/java/org/neo4j/kernel/impl/osgi/OSGiExtensionLoader.java). So, using my forked version, the LuceneIndexProvider is being exposed as OSGi service, so it is visible to OSGi loader and org.neo4j.kernel.IndexManagerImpl.getIndexProvider shouldn't throw IllegalArgumentException anymore. BUT, as shown below, i know have a exception during datasource initialisation. The LuceneDataSource class is not visible to the kernel bundle, where service registration occurs. So I see two possible solution for this : - change lucene-index bundle to export-package org.neo4j.index.impl.lucene (bad solution) - add a bundle activator in lucene-index bundle to register LuceneIndexProvider service on bundle startup, but I don't know its dependencies. Let me know if my analysis is not clear for you ... PS : changes made to the test case have been comited to git://github.com/njouanin/neo4j-osgi-examples.git [Framework Event Dispatcher] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED activating null null [Framework Event Dispatcher] DEBUG com.springsource.javax.transaction - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.kernel - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.kernel - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.kernel: Service org.neo4j.kernel.impl.transaction.TransactionManagerProvider registered with implementation org.neo4j.kernel.impl.transaction.TransactionManagerProvider[native] [Framework Event Dispatcher] WARN org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Implementation class org.neo4j.kernel.impl.management.JmxExtension not found by classloader Kernel: attempting to load extensions of type org.neo4j.kernel.Version [Framework Event Dispatcher] DEBUG org.neo4j.kernel - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.kernel: Service org.neo4j.kernel.Version registered with implementation Neo4j - Graph Database Kernel 1.4-SNAPSHOT (revision: 1.4.M01-32-g51e2494-dirty) [Framework Event Dispatcher] DEBUG org.apache.servicemix.bundles.lucene - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - BundleEvent STARTED [Framework Event Dispatcher] DEBUG org.neo4j.lucene-index - ServiceEvent REGISTERED [Framework Event Dispatcher] INFO org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene] Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension Kernel: attempting to load extensions of type org.neo4j.graphdb.index.IndexProvider org.neo4j.graphdb.TransactionFailureException: Could not create data source lucene-index[lucene-index] at org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:181) at org.neo4j.index.impl.lucene.LuceneIndexImplementation.init(LuceneIndexImplementation.java:72) at org.neo4j.index.impl.lucene.LuceneIndexProvider.load(LuceneIndexProvider.java:38) at org.neo4j.kernel.KernelData.loadIndexImplementations(KernelData.java:146) at org.neo4j.kernel.EmbeddedGraphDbImpl$2.initializeIndexProviders(EmbeddedGraphDbImpl.java:179) at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:159) at org.neo4j.kernel.EmbeddedGraphDbImpl.init(EmbeddedGraphDbImpl.java:189) at
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Hi, I'll try this during the weekend if you agree and I'll let you know. 2011/6/9 Peter Neubauer peter.neuba...@neotechnology.com Nicolas, I have now a failing testcase (albeit using snapshot versions of PAX stuff, trying to relax that ASAP) at https://github.com/neo4j/neo4j-osgi-examples that exposes the IndexProvider not being found in OSGi environments. Is your fork of Neo4j Community fixing this issue? In that case, it would be great to verify it against the testcase and merge it in! 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, Jun 2, 2011 at 10:33 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ 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] How to embed neo4j to OSGI env without spring?
Yeah, that would be great Nicolas! The only thing is that you will need to build Pax Tinybundles, g...@github.com:ops4j/org.ops4j.pax.tinybundles.git since I am using SNAPSHOT dep there. Lemme know if you need help! 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 Fri, Jun 10, 2011 at 9:43 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi, I'll try this during the weekend if you agree and I'll let you know. 2011/6/9 Peter Neubauer peter.neuba...@neotechnology.com Nicolas, I have now a failing testcase (albeit using snapshot versions of PAX stuff, trying to relax that ASAP) at https://github.com/neo4j/neo4j-osgi-examples that exposes the IndexProvider not being found in OSGi environments. Is your fork of Neo4j Community fixing this issue? In that case, it would be great to verify it against the testcase and merge it in! 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, Jun 2, 2011 at 10:33 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ 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 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Nicolas, I have now a failing testcase (albeit using snapshot versions of PAX stuff, trying to relax that ASAP) at https://github.com/neo4j/neo4j-osgi-examples that exposes the IndexProvider not being found in OSGi environments. Is your fork of Neo4j Community fixing this issue? In that case, it would be great to verify it against the testcase and merge it in! 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, Jun 2, 2011 at 10:33 AM, Nicolas Jouanin nicolas.joua...@gmail.com wrote: Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ 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] How to embed neo4j to OSGI env without spring?
Super, I have created a test case that exhibits this error. Git clone https://github.com/neo4j/neo4j-osgi-examples and do mvn test And you should see the error output. Let's work together on this in order to solve it, and then include it in the manual! 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, Jun 4, 2011 at 4:08 AM, Super Wang wangxu...@gmail.com wrote: Hi, I'm following this guide to run Felix 3.2.2 in my eclipse 3.6.2. One simple different is I'm using a JavaSE-1.6 as execution environment JRE(see the attached snapshot). After done, copy the following bundles from neo4j-1.4M03 into bundles folder: geronimo-jta_1.1_spec-1.1.1.jar lucene-core-3.1.0.jar neo4j-graph-algo-1.4.M03.jar neo4j-kernel-1.4.M03.jar neo4j-lucene-index-1.4.M03.jar Then, launch Felix, but in the console, it shows: ERROR: Bundle org.neo4j.graph-algo [3] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-graph-algo-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)]) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)] at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) ERROR: Bundle org.neo4j.kernel [4] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-kernel-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:736) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) ERROR: Bundle org.neo4j.lucene-index [5] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-lucene-index-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis)) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) Welcome to Apache Felix Gogo Then, I typed lb in console to list all bundles loaded, and here's the result: START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (3.2.2) 1|Active |1|geronimo-jta_1.1_spec (1.1.1) 2|Active | 1|file:/E:/Workspaces/MyOwn/Felix/bundle/lucene-core-3.1.0.jar (0.0.0) 3|Installed |1|Neo4j - Graph Algorithms (1.4.0.M03) 4|Installed |1|Neo4j - Graph Database Kernel (1.4.0.M03) 5|Installed |1|Neo4j - Lucene Index (1.4.0.M03) 6|Active |1|Apache Felix Bundle Repository (1.6.2) 7|Active |1|Apache Felix Gogo Command (0.8.0) 8|Active |1|Apache Felix Gogo Runtime (0.8.0) 9|Active |1|Apache Felix Gogo Shell (0.8.0) All neo4j bundles are in Installed state, and one more thing that it looks like lucene-core-3.1.0.jar is not a OSGI friendly jar On Sat, Jun 4, 2011 at 05:48, Peter Neubauer peter.neuba...@neotechnology.com wrote: Hi there, what JRE do you need to run with? Could
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Guys, I adjusted the Neo4j Kernal bundle manifest to not import sun.* packages. Now, with the springsource JTA bundle, the Neo4j Kernel bundle is at least activated, which should solve the first problem. will continue with the Index Provider issue :) https://github.com/neo4j/neo4j-osgi-examples/blob/master/src/test/java/org/neo4j/examples/osgi/OSGiTest.java 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, Jun 8, 2011 at 12:11 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Super, I have created a test case that exhibits this error. Git clone https://github.com/neo4j/neo4j-osgi-examples and do mvn test And you should see the error output. Let's work together on this in order to solve it, and then include it in the manual! 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, Jun 4, 2011 at 4:08 AM, Super Wang wangxu...@gmail.com wrote: Hi, I'm following this guide to run Felix 3.2.2 in my eclipse 3.6.2. One simple different is I'm using a JavaSE-1.6 as execution environment JRE(see the attached snapshot). After done, copy the following bundles from neo4j-1.4M03 into bundles folder: geronimo-jta_1.1_spec-1.1.1.jar lucene-core-3.1.0.jar neo4j-graph-algo-1.4.M03.jar neo4j-kernel-1.4.M03.jar neo4j-lucene-index-1.4.M03.jar Then, launch Felix, but in the console, it shows: ERROR: Bundle org.neo4j.graph-algo [3] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-graph-algo-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)]) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)] at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) ERROR: Bundle org.neo4j.kernel [4] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-kernel-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:736) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) ERROR: Bundle org.neo4j.lucene-index [5] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-lucene-index-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis)) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) Welcome to Apache Felix Gogo Then, I typed lb in console to list all bundles loaded, and here's the result: START LEVEL 1 ID|State |Level|Name
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Thanks Peter, and here's my error log: [INFO] Surefire report directory: D:\git\neo4j-osgi-examples\target\surefire-reports --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 516 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. 2011-6-8 19:41:34 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\pax exam-container-rbc\2.1.0\pax-exam-container-rbc-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\ ax-exam-extender-service\2.1.0\pax-exam-extender-service-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.osgi:org.osgi.compendium:jar:4.2.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\osgi\org.osgi.compendium\4.2.0\ rg.osgi.compendium-4.2.0.jar 2011-6-8 19:41:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-api:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\pax- ogging-api\1.6.2\pax-logging-api-1.6.2.jar 2011-6-8 19:42:01 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-service:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\ ax-logging-service\1.6.2\pax-logging-service-1.6.2.jar 2011-6-8 19:42:25 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1) as D:\Software\Development\SDKandLibrary\maven\repository\org\apache\geronim \specs\geronimo-jta_1.1_spec\1.1\geronimo-jta_1.1_spec-1.1.jar 2011-6-8 19:42:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.neo4j:neo4j-kernel:jar:1.4.M03) as D:\Software\Development\SDKandLibrary\maven\repository\org\neo4j\neo4j-kernel\1.4.M03\neo4j-ke nel-1.4.M03.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. ERROR: Bundle org.neo4j.kernel [7] Error starting mvn:org.neo4j/neo4j-kernel/1.4.M03 (org.osgi.framework.BundleException: Unresolved constraint in bu dle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; (package=com.sun.source.tree)) [FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.neo4j.kernel - FrameworkEvent ERROR org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:736) [FelixDispatchQueue] DEBUG org.apache.felix.framework - FrameworkEvent STARTLEVEL CHANGED at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:736) [FelixDispatchQueue] DEBUG org.ops4j.pax.exam.spi.probesupport.intern.DefaultResourceWriter_3350335 - BundleEvent INSTALLED [FelixDispatchQueue] DEBUG org.ops4j.pax.exam.spi.probesupport.intern.DefaultResourceWriter_3350335 - BundleEvent RESOLVED [main] DEBUG
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Yes. You need the latest kernel package which will be online in some hour, and git pull again in this project :-) Sent from my phone. On Jun 8, 2011 1:45 PM, Super Wang wangxu...@gmail.com wrote: Thanks Peter, and here's my error log: [INFO] Surefire report directory: D:\git\neo4j-osgi-examples\target\surefire-reports --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 516 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. 2011-6-8 19:41:34 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\pax exam-container-rbc\2.1.0\pax-exam-container-rbc-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\ ax-exam-extender-service\2.1.0\pax-exam-extender-service-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.osgi:org.osgi.compendium:jar:4.2.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\osgi\org.osgi.compendium\4.2.0\ rg.osgi.compendium-4.2.0.jar 2011-6-8 19:41:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-api:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\pax- ogging-api\1.6.2\pax-logging-api-1.6.2.jar 2011-6-8 19:42:01 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-service:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\ ax-logging-service\1.6.2\pax-logging-service-1.6.2.jar 2011-6-8 19:42:25 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1) as D:\Software\Development\SDKandLibrary\maven\repository\org\apache\geronim \specs\geronimo-jta_1.1_spec\1.1\geronimo-jta_1.1_spec-1.1.jar 2011-6-8 19:42:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.neo4j:neo4j-kernel:jar:1.4.M03) as D:\Software\Development\SDKandLibrary\maven\repository\org\neo4j\neo4j-kernel\1.4.M03\neo4j-ke nel-1.4.M03.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. ERROR: Bundle org.neo4j.kernel [7] Error starting mvn:org.neo4j/neo4j-kernel/1.4.M03 (org.osgi.framework.BundleException: Unresolved constraint in bu dle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; (package=com.sun.source.tree)) [FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.neo4j.kernel - FrameworkEvent ERROR org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:736) [FelixDispatchQueue] DEBUG org.apache.felix.framework - FrameworkEvent STARTLEVEL CHANGED at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:736) [FelixDispatchQueue] DEBUG
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
OK, I will try this later, thank you very much! On Wed, Jun 8, 2011 at 19:48, Peter Neubauer neubauer.pe...@gmail.comwrote: Yes. You need the latest kernel package which will be online in some hour, and git pull again in this project :-) Sent from my phone. On Jun 8, 2011 1:45 PM, Super Wang wangxu...@gmail.com wrote: Thanks Peter, and here's my error log: [INFO] Surefire report directory: D:\git\neo4j-osgi-examples\target\surefire-reports --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 516 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. 2011-6-8 19:41:34 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\pax exam-container-rbc\2.1.0\pax-exam-container-rbc-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\ ax-exam-extender-service\2.1.0\pax-exam-extender-service-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.osgi:org.osgi.compendium:jar:4.2.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\osgi\org.osgi.compendium\4.2.0\ rg.osgi.compendium-4.2.0.jar 2011-6-8 19:41:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-api:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\pax- ogging-api\1.6.2\pax-logging-api-1.6.2.jar 2011-6-8 19:42:01 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.logging:pax-logging-service:jar:1.6.2) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\logging\ ax-logging-service\1.6.2\pax-logging-service-1.6.2.jar 2011-6-8 19:42:25 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1) as D:\Software\Development\SDKandLibrary\maven\repository\org\apache\geronim \specs\geronimo-jta_1.1_spec\1.1\geronimo-jta_1.1_spec-1.1.jar 2011-6-8 19:42:46 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.neo4j:neo4j-kernel:jar:1.4.M03) as D:\Software\Development\SDKandLibrary\maven\repository\org\neo4j\neo4j-kernel\1.4.M03\neo4j-ke nel-1.4.M03.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. ERROR: Bundle org.neo4j.kernel [7] Error starting mvn:org.neo4j/neo4j-kernel/1.4.M03 (org.osgi.framework.BundleException: Unresolved constraint in bu dle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; (package=com.sun.source.tree)) [FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-service - BundleEvent STARTED org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG [bundle@6] - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.neo4j.kernel - FrameworkEvent ERROR org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [7]: Unable to resolve 7.0: missing requirement [7.0] package; ( ackage=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3518) at org.apache.felix.framework.Felix.startBundle(Felix.java:1750) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:736) [FelixDispatchQueue] DEBUG org.apache.felix.framework - FrameworkEvent STARTLEVEL CHANGED at
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Guys, I have tracked down the issues now to the actual thing. https://github.com/neo4j/neo4j-osgi-examples/blob/master/src/test/java/org/neo4j/examples/osgi/OSGiTest.javanow wraps lucene, and loads the Activator that tries to get and index, see https://github.com/neo4j/neo4j-osgi-examples/blob/master/src/test/java/org/neo4j/examples/osgi/Neo4jActivator.java. I now get [Framework Event Dispatcher] DEBUG BuildByTinyBundlestinybundles7256886623461679180UID - FrameworkEvent ERROR org.osgi.framework.BundleException: Exception in org.neo4j.examples.osgi.Neo4jActivator.start() of bundle BuildByTinyBundlestinybundles7256886623461679180UID. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) Caused by: java.lang.IllegalArgumentException: No index provider 'lucene' found at org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:69) at org.neo4j.kernel.IndexManagerImpl.findIndexConfig(IndexManagerImpl.java:109) at org.neo4j.kernel.IndexManagerImpl.getOrCreateIndexConfig(IndexManagerImpl.java:171) at org.neo4j.kernel.IndexManagerImpl.forNodes(IndexManagerImpl.java:242) at org.neo4j.examples.osgi.Neo4jActivator.start(Neo4jActivator.java:43) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) ... 11 more which is exactly the kind of thing we are expecting. However, it seems the the ServiceLoader approach is not really compatible with OSGi, see http://jbossosgi.blogspot.com/2010/01/suns-serviceloader-and-how-it-relates.htmlfor details. Eelco, did you solve this problem in some nice way so I can adjust the tests? 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, Jun 8, 2011 at 2:01 PM, Super Wang wangxu...@gmail.com wrote: OK, I will try this later, thank you very much! On Wed, Jun 8, 2011 at 19:48, Peter Neubauer neubauer.pe...@gmail.com wrote: Yes. You need the latest kernel package which will be online in some hour, and git pull again in this project :-) Sent from my phone. On Jun 8, 2011 1:45 PM, Super Wang wangxu...@gmail.com wrote: Thanks Peter, and here's my error log: [INFO] Surefire report directory: D:\git\neo4j-osgi-examples\target\surefire-reports --- T E S T S --- Running org.neo4j.examples.osgi.OSGiTest 516 [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.1.0) created. 2011-6-8 19:41:34 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-container-rbc:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\pax exam-container-rbc\2.1.0\pax-exam-container-rbc-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.ops4j.pax.exam:pax-exam-extender-service:jar:2.1.0) as D:\Software\Development\SDKandLibrary\maven\repository\org\ops4j\pax\exam\ ax-exam-extender-service\2.1.0\pax-exam-extender-service-2.1.0.jar 2011-6-8 19:41:41 org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve INFO: Resolved (org.osgi:org.osgi.compendium:jar:4.2.0) as
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
However, it seems the the ServiceLoader approach is not really compatible with OSGi, see http://jbossosgi.blogspot.com/2010/01/suns-serviceloader-and-how-it-relates.htmlfor details. Eelco, did you solve this problem in some nice way so I can adjust the tests? I'm afraid not. I dropped in the newer version of Lucene, and that fixed the problem for me, but I'm not doing anything in particular with OSGi. If it matters, I'm using Guice for dependency injection, and using Blueprint to wrap around Neo4J: import com.google.inject.AbstractModule; import com.teachscape.commons.settings.Settings; import com.teachscape.commons.util.Files; import com.tinkerpop.blueprints.pgm.Graph; import com.tinkerpop.blueprints.pgm.TransactionalGraph; import com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph; import java.io.File; public class Neo4JModule extends AbstractModule { private final Settings settings; public Neo4JModule(Settings settings) { this.settings = settings; } @Override protected void configure() { String graphdir = settings.getSetting(neo4jdb.dir); File f = new File(graphdir); if (!f.isDirectory()) { f.mkdirs(); } boolean startClean = settings.getBooleanSetting(graphdb.startClean, true); if (startClean) { Files.delete(f); // Neo4jGraph will mark as 'fresh' when it detects dir doesn't exist if (f.exists()) { throw new IllegalArgumentException( String.format(graphdb.startClean=true, but can't delete directory %s, f.getAbsolutePath())); } } Neo4jGraph graph = new Neo4jGraph(graphdir); graph.setTransactionMode(TransactionalGraph.Mode.MANUAL); bind(Graph.class).toInstance(graph); bind(Neo4jGraph.class).toInstance(graph); bind(GraphShutdownHookInit.class).asEagerSingleton(); } } Blueprints 0.7, Neo4J 1.4-SNAPSHOT, Lucene 3.2.0. In my test code, IndexVertex index = ((IndexableGraph) graph).getIndex(Index.VERTICES, Vertex.class); then works, whereas at first it didn't because of problem with the older Lucene. Cheers, Eelco ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Who can help me get out this? On Sat, Jun 4, 2011 at 10:08, Super Wang wangxu...@gmail.com wrote: Hi, I'm following this guide to run Felix 3.2.2 in my eclipse 3.6.2. One simple different is I'm using a JavaSE-1.6 as execution environment JRE(see the attached snapshot). After done, copy the following bundles from neo4j-1.4M03 into bundles folder: geronimo-jta_1.1_spec-1.1.1.jar lucene-core-3.1.0.jar neo4j-graph-algo-1.4.M03.jar neo4j-kernel-1.4.M03.jar neo4j-lucene-index-1.4.M03.jar Then, launch Felix, but in the console, it shows: ERROR: Bundle org.neo4j.graph-algo [3] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-graph-algo-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)]) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)] at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) ERROR: Bundle org.neo4j.kernel [4] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-kernel-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:736) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) ERROR: Bundle org.neo4j.lucene-index [5] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-lucene-index-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis)) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) Welcome to Apache Felix Gogo Then, I typed lb in console to list all bundles loaded, and here's the result: START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (3.2.2) 1|Active |1|geronimo-jta_1.1_spec (1.1.1) 2|Active | 1|file:/E:/Workspaces/MyOwn/Felix/bundle/lucene-core-3.1.0.jar (0.0.0) 3|Installed |1|Neo4j - Graph Algorithms (1.4.0.M03) 4|Installed |1|Neo4j - Graph Database Kernel (1.4.0.M03) 5|Installed |1|Neo4j - Lucene Index (1.4.0.M03) 6|Active |1|Apache Felix Bundle Repository (1.6.2) 7|Active |1|Apache Felix Gogo Command (0.8.0) 8|Active |1|Apache Felix Gogo Runtime (0.8.0) 9|Active |1|Apache Felix Gogo Shell (0.8.0) All neo4j bundles are in Installed state, and one more thing that it looks like lucene-core-3.1.0.jar is not a OSGI friendly jar On Sat, Jun 4, 2011 at 05:48, Peter Neubauer peter.neuba...@neotechnology.com wrote: Hi there, what JRE do you need to run with? Could you provide a testcase, maybe done with http://ops4j1.jira.com/wiki/display/paxexam/Pax+Exam so we can fix the issues? Thanks for your feedback! 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 Fri, Jun 3, 2011 at 8:50 AM, Super Wang
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Super, I will try to pull up an environment today, but not sure I can make it as there is a lot of other stuff to do. Will keep you posted on the progress. 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, Jun 8, 2011 at 7:11 AM, Super Wang wangxu...@gmail.com wrote: Who can help me get out this? On Sat, Jun 4, 2011 at 10:08, Super Wang wangxu...@gmail.com wrote: Hi, I'm following this guide to run Felix 3.2.2 in my eclipse 3.6.2. One simple different is I'm using a JavaSE-1.6 as execution environment JRE(see the attached snapshot). After done, copy the following bundles from neo4j-1.4M03 into bundles folder: geronimo-jta_1.1_spec-1.1.1.jar lucene-core-3.1.0.jar neo4j-graph-algo-1.4.M03.jar neo4j-kernel-1.4.M03.jar neo4j-lucene-index-1.4.M03.jar Then, launch Felix, but in the console, it shows: ERROR: Bundle org.neo4j.graph-algo [3] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-graph-algo-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)]) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.graph-algo [3]: Unable to resolve 3.0: missing requirement [3.0] package; ((package=org.neo4j.graphdb)(version=1.4.0)) [caused by: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)] at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192) ERROR: Bundle org.neo4j.kernel [4] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-kernel-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree)) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:736) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.kernel [4]: Unable to resolve 4.0: missing requirement [4.0] package; (package=com.sun.source.tree) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) ERROR: Bundle org.neo4j.lucene-index [5] Error starting file:/E:/Workspaces/MyOwn/Felix/bundle/neo4j-lucene-index-1.4.M03.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis)) org.osgi.framework.BundleException: Unresolved constraint in bundle org.neo4j.lucene-index [5]: Unable to resolve 5.0: missing requirement [5.0] package; (package=org.apache.lucene.analysis) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564) at org.apache.felix.framework.Felix.startBundle(Felix.java:1797) 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:736) Welcome to Apache Felix Gogo Then, I typed lb in console to list all bundles loaded, and here's the result: START LEVEL 1 ID|State |Level|Name 0|Active |0|System Bundle (3.2.2) 1|Active |1|geronimo-jta_1.1_spec (1.1.1) 2|Active | 1|file:/E:/Workspaces/MyOwn/Felix/bundle/lucene-core-3.1.0.jar (0.0.0) 3|Installed |1|Neo4j - Graph Algorithms (1.4.0.M03) 4|Installed |1|Neo4j - Graph Database Kernel (1.4.0.M03) 5|Installed |1|Neo4j - Lucene Index (1.4.0.M03) 6|Active |1|Apache Felix Bundle Repository (1.6.2) 7|Active |1|Apache Felix Gogo Command (0.8.0) 8|Active |1|Apache Felix Gogo Runtime (0.8.0) 9|Active |1|Apache Felix Gogo Shell (0.8.0) All neo4j bundles are in Installed state, and one more thing that it looks like lucene-core-3.1.0.jar is not a OSGI friendly jar On Sat, Jun 4, 2011 at 05:48, Peter
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Finally, I found these in JDK_HOME\lib\tools.jar, this is not a part of JRE but a part of JDK, which means neo4j can't run under OSGI with JRE only On Fri, Jun 3, 2011 at 10:29, Super Wang wangxu...@gmail.com wrote: Thanks, but I'm working on equinox OSGI environment. I found that org.neo4j.kernel requires same packages under com.sun.tree, com.sun.util and com.sun.javac, but my app needs to run under some non-sun JRE, like openJDK or IBM jvm, there's no com.sun in these JREs Does this means neo4j can only run with sun JRE? On Thu, Jun 2, 2011 at 16:33, Nicolas Jouanin nicolas.joua...@gmail.comwrote: Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ 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] How to embed neo4j to OSGI env without spring?
I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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] How to embed neo4j to OSGI env without spring?
Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How to embed neo4j to OSGI env without spring?
Thanks, but I'm working on equinox OSGI environment. I found that org.neo4j.kernel requires same packages under com.sun.tree, com.sun.util and com.sun.javac, but my app needs to run under some non-sun JRE, like openJDK or IBM jvm, there's no com.sun in these JREs Does this means neo4j can only run with sun JRE? On Thu, Jun 2, 2011 at 16:33, Nicolas Jouanin nicolas.joua...@gmail.comwrote: Hi, This page may help you : http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation Le 2 juin 2011 à 09:30, Super Wang a écrit : I've tried to expose org.neo4j.graphdb.GraphDatabaseService as a service component directly and use a delegate class as implementation, but failed... On Thu, Jun 2, 2011 at 12:34, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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 ___ 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] How to embed neo4j to OSGI env without spring?
Hey, The Neo4j libraries should be usable within OSGi, though we're a bit lax in keeping on top of that. The best approach would be to use one bundle to instantiate the database and advertise the reference as a service for use by other bundles. Cheers, Andreas On Jun 1, 2011, at 8:25 PM, Super Wang wrote: Hi folks, I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without Spring) as a component, so I can keep a single instance of graph database and can make it available for all other bundles. Any ideas about how to implement this? Thank you very much. ___ 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