sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Klco <>
Subject OSGi R6 - Default Configuration Values
Date Thu, 17 May 2018 17:43:31 GMT

I've been trying to figure this out and can't seem to crack it so I was
hoping someone might have some insight.

I'm trying to update Sling Auth Forms to OSGi R6 as per:

I've got everything converted over and it works if I specify a
configuration. However, with the Apache Felix SCR annotations this service
registered immediately with a configuration with the default values, so
there's clearly some difference I'm missing. I've tried changing everything
I can think of to get the default values from the configuration to be
registered when the component is starts, but every time I get something
like this:

17.05.2018 10:22:47.084 *INFO* [Background Update (84)] Service
[]] ServiceEvent
17.05.2018 10:22:47.085 *DEBUG* [Background Update (84)] Activating with
configuration :
{jaas_realmName=null, form_onexpire_login=false, jaas_ranking=0,
jaas_controlFlag=null, form_auth_storage=null, useInclude=false,
annotationType=null, form_credentials_name=null, form_token_file=null,
service_ranking=0, path=[Ljava.lang.String;@5b1b6745, form_login_form=null,
form_token_fastseed=false, hashCode=0, equals=false, toString=null,
form_auth_name=null, form_auth_timeout=0, form_default_cookie_domain=null}
and properties {}
17.05.2018 10:22:47.085 *ERROR* [Background Update (84)] bundle
(84)[] : The
activate method has thrown an exception (java.lang.NullPointerException)

It seems like this should work based on other examples I've seen online,

So far I have tried:

   - Specifying the configuration pid
   - Trying annotation defaultvalue vs method default
   - Changing the start level of the bundle
   - Changing to a single activate parameter
   - Trying required / optional configuration binding

The only thing that did work was specifying a configuration node in the
bundle content configuration, but this seems hacky.

I've checked the code in to Auth Form:

If anyone could take a few minutes to review or has any thoughts / ideas /
suggestions I'd really appreciate it as I'm at a roadblock.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message