Hi,

this is a summary of a discussion I had with Suat on the #stanbol IRC channel:

Components need to register/unregister TripleCollections themselves.

In that specific case line 150 - 157 of SolrStoreImpl should be moved
to the activate(..) Method. The SerivceRegistration returned by
BundleContext.registerService(..) needs to be kept as filed and be
used in the deactivate(..) method to unregister the TripleCollection.

This should solve the reported issue.

best
Rupert

On Sat, Sep 8, 2012 at 6:32 PM, Suat Gönül <suatgo...@gmail.com> wrote:
> Hi,
>
> Meric, thanks for the patch. However, I think we need a more general
> solution since the patch seems specific to Contenthub. I mean we should be
> able to track all registered TripleCollections to be used by SPARQL
> endpoint.
>
> @All: As far as I understand single objects registered as services to the
> OSGi are not reachable after a restart. As a solution, I think we can
> create a "sparql" module within the commons and implement a
> SPARQLTripleCollectionRegistry to track the triple collections to be used
> by SPARQL endpoint and move the existing code from the commons.web.sparql
> into this new module. If there is no other ideas, I will implement this in
> the following days.
>
> Best,
> Suat
>
>
> On Sat, Sep 8, 2012 at 10:06 AM, Meriç Taze <merict...@gmail.com> wrote:
>
>> Hi,
>>
>> I think I have no permission to send file to stanbol-dev since it seems
>> attached on my sended mail.
>>
>> You can use this:
>>
>>    https://docs.google.com/open?id=0B1vdVgPRtYw0RU5udGluZzZMRk0<
>> https://www.dropbox.com/s/mbp4cjvjbudouiv/solr-store-impl.patch>
>>
>> Sorry for the inconvenience.
>>
>> Best,
>> Meric.
>>
>> 2012/9/7 Maciek Sykulski <macie...@gmail.com>
>>
>> > Hi Meric,
>> >
>> > I could test how it works, but I don't see any file attached.
>> >
>> > Maciek
>> >
>> > On Fri, Sep 7, 2012 at 4:57 PM, Meriç Taze <merict...@gmail.com> wrote:
>> > >
>> > > I prepared a patch file, but I can not tested it well, if you want, you
>> > > can use
>> > > attached patch file by using below commands;
>> > >
>> >
>> > >    > cd STANBOL_FOLDER/trunk/contenthub/store/solr
>> > >    > patch -p0 -i PATH_TO_THE_PATCH_FILE
>> > >
>> > >      this command must patch the SolrStoreImpl.java with output:
>> > >      "patching file
>> > >
>> >
>> src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java"
>> > >
>> > >    > mvn clean install -P installBundle -Dsling.url=
>> > > http://localhost:8080/system/console
>> > >
>> > > or wait for more stable version, probably ready in next week. You can
>> > > follow this issue from
>> https://issues.apache.org/jira/browse/STANBOL-731
>> > >
>> > > Regards,
>> > > Meric.
>> > >
>> > > 2012/9/7 Maciek Sykulski <macie...@gmail.com>
>> > >
>> > >> Hi Meric,
>> > >>
>> > >> > After creating your first contentitem, graph is created by TcManager
>> > >> and it
>> > >> > appears in
>> > >> > /sparql endpoint.
>> > >>
>> > >> > However, due to a bug in SolrStoreImpl, when you restart your
>> > >> > launcher or rebuild it with this command ...
>> > >>
>> > >>
>> > >> I indeed remember to have seen registered triple collection under
>> > /sparql
>> > >> soon after first run, but then it disappeared.
>> > >>
>> > >> > graph will still exist but it is not registered in the OSGi
>> > environment
>> > >> > anymore.
>> > >> > Therefore, sparql endpoint can not reach the enhancement graph. I'll
>> > >> create
>> > >> > an issue and a patch file for this bug.
>> > >>
>> > >>
>> > >> Is there any way I can register this graph manually using Felix Web
>> > >> Console
>> > >>  /system/console ?
>> > >>
>> > >> Best,
>> > >> Maciek
>> > >>
>> > >>
>> > >>
>> > >> On Thu, Sep 6, 2012 at 12:36 PM, Meriç Taze <merict...@gmail.com>
>> > wrote:
>> > >>
>> > >> > Hi,
>> > >> >
>> > >> > 2012/9/5 Maciek Sykulski <macie...@gmail.com>
>> > >> >
>> > >> > >
>> > >> > > *1. SPARQL endpoint
>> > >> > > * "There is no registered TripleCollection."  This message shows
>> > under
>> > >> > > sparql/ endpoint. There are content items residing inside
>> > contenthub.
>> > >> > > I cannot ask any sparql query for content items (because of this
>> > >> > message?).
>> > >> > > How to fix that, to be able to ask SPARQL queries on ehnancements?
>> > >> > >
>> > >> > > In our configuration component
>> > >> > > org.apache.stanbol.contenthub.ldpath.solr.SemanticIndexManagerImpl
>> > is
>> > >> > > active. What is lacking in the below configuration?
>> > >> > >
>> > >> >
>> > >> > In first run after building stanbol, there is no enhancement graph.
>> > >> After
>> > >> > creating
>> > >> > your first contentitem, graph is created by TcManager and it appears
>> > in
>> > >> > /sparql
>> > >> > endpoint. However, due to a bug in SolrStoreImpl, when you restart
>> > your
>> > >> > launcher or rebuild it with this command:
>> > >> >
>> > >> >     mvn -o install -DskipTests -P installBundle
>> > >> >             -Dsling.url=http://localhost:8080/system/console
>> > >> >
>> > >> > graph will still exist but it is not registered in the OSGi
>> > environment
>> > >> > anymore.
>> > >> > Therefore, sparql endpoint can not reach the enhancement graph. I'll
>> > >> create
>> > >> > an issue and a patch file for this bug.
>> > >> >
>> > >> >
>> > >> >
>> > >> > > *2.* How / where to configure a triple store to be accessible
>> > through
>> > >> > > Stanbol api,  SPARQL endpoint?
>> > >> > >
>> > >> > >
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >> > I think this is the answer of your question:
>> > >> >
>> > >> >
>> > >> >
>> > >>
>> >
>> http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201206.mbox/%3ccaa7lao0wqetbwt1gwegqe_hwpd3lfhjmiy4lmq8xdw0gmkd...@mail.gmail.com%3E
>> > >> >
>> > >>
>> > >> Thanks, this is helpful indeed.
>> > >>
>> > >>
>> > >>
>> > >> > Best,
>> > >> > Meric.
>> > >> >
>> > >>
>> > >
>> > >
>> >
>>



-- 
| Rupert Westenthaler             rupert.westentha...@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to