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
> <nicolas.joua...@gmail.com> 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
>>> <nicolas.joua...@gmail.com> 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/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
>>>> 
>>>> _______________________________________________
>>>> 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

Reply via email to