Hi again,

What I'm struggling with is that there is no indication as to what
conditions need to be true in order for the repository to start. The
OakOSGiRepositoryFactory has a static class RepositoryTracker which is
waiting for the addingService method to be called before completing the
future but this is never called, I'm guessing before the preconditions for
the Repository are never satisfied. I can see that more than 70 services
are registered, but what is missing?

Thanks in advance,
Paul



On Thu, 31 Oct 2019 at 18:06, Paul Wilson <[email protected]> wrote:

> Hi,
>
> To follow on from this - I have created a repository that shows that
> adding `oak-pojosr` as a dependency and copy-pasting
> the OakOSGiRepositoryFactoryTest causes the repository to fail to start
> with the following error:
>
> INFO  SecurityProviderRegistration:478 - Aborting: preconditions are not
> satisfied: Preconditions(preconditions =
> [org.apache.jackrabbit.oak.security.authentication.token.TokenConfigurat
> ionImpl,
> org.apache.jackrabbit.oak.spi.security.user.action.DefaultAuthorizableActionProvider,
> org.apache.jackrabbit.oak.security.user.UserAuthenticationFactoryImpl,
> org.apache.jackrabbit.oak.security.autho
> rization.AuthorizationConfigurationImpl,
> org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl,
> org.apache.jackrabbit.oak.security.authorization.restriction.RestrictionProviderImpl],
> candi
> dates =
> [org.apache.jackrabbit.oak.spi.security.user.action.DefaultAuthorizableActionProvider,
> org.apache.jackrabbit.oak.security.authentication.token.TokenConfigurationImpl,
> org.apache.jackrabbit.oak.secur
> ity.user.UserAuthenticationFactoryImpl,
> org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl,
> org.apache.jackrabbit.oak.security.authorization.restriction.RestrictionProviderImpl])
>
> The test hangs and finally timesout. It seems
> that AuthorizationConfigurationImpl is never registered. Manually
> registering AuthorizationConfigurationImpl
> allows SecurityProviderRegistration to work however the repository still
> hangs during startup.
>
> Repository here - https://github.com/paulalexwilson/oak-pojosr-test
>
> Are there any examples anywhere of anyone using oak-pojosr that I could
> follow?
>
> Regards,
> Paul
>
>
> On Tue, 29 Oct 2019 at 14:08, Paul Wilson <[email protected]>
> wrote:
>
>> Hi,
>>
>> I'm looking to implement something resembling a 'materialised view' over
>> content; essentially a special node which acquires or loses references to
>> checked in nodes depending upon whether they match a given query. Since I
>> need the query to run after property indexing takes place, I've been
>> looking to plug an Observer which also has access to the NodeStore for
>> writing the results (ala Lucene's async indexer).
>>
>> I believe the best way to have my Observer access the NodeStore is
>> via @Reference injection from the OSGi container. I have no plans to use
>> OSGi however so I've been looking at using PojoSR taking inspiration from
>> the tests here:
>> https://github.com/apache/jackrabbit-oak/tree/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi
>> .
>>
>> Unfortunately pursuing this line has been a massive time sink where all
>> roads lead to a timed out test due to an incorrectly configured container.
>> I could go into detail about this journey if it would help but given the
>> about of work I had to do just to get this far, I feel like my approach is
>> wrong. Also the whole PojoSr project feels unmaintained.
>>
>> So -  how would you recommend I attack this problem? How do I spin up a
>> test that allows me to inject a NodeStore into my Observer and then perform
>> session operations?
>>
>> Any help very appreciated!
>> Regards - Paul
>>
>>

Reply via email to