Hi David,

To set the Karaf log on DEBUG ,in the console type:

log:set DEBUG

Regards,
Morgan

2016-05-04 10:55 GMT+02:00 David Leangen <apa...@leangen.net>:

>
> Hmmmm… I am not able to set the debug level properly in Karaf.
>
> On this page:
>
>
> http://felix.apache.org/documentation/subprojects/apache-felix-service-component-runtime.html#configuration
>
> It says to set ds.loglevel = debug (confirmed here:
> http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java
> ).
>
> The PID should be org.apache.felix.scr.ScrService, so I create a config
> file in etc (where all the others are stored) named
> org.apache.felix.scr.ScrService.cfg. Unfortunately, this does make any
> change to the logging level. :-(
>
>
> Along the way, I noticed that if the UserAdmin starts before my
> OAuthUserAdmin, the components get satisfied and work as expected. This
> does not smell right to me…
>
>
> Cheers,
> =David
>
>
>
> On May 4, 2016, at 3:34 PM, David Jencks <david.a.jen...@gmail.com> wrote:
>
> The filters look OK to me (and you need them).  Are you sure you are still
> getting the cycle error?  You have a triangle which sometimes causes
> problems but I don’t see how it would here.  The debug logging ought to
> show you which UserAdmin is getting bound to each of your components so you
> should be able to check if the filter is actually working the way you
> expect.
>
> david jencks
>
> On May 3, 2016, at 11:08 PM, David Leangen <apa...@leangen.net> wrote:
>
>
> Hi David,
>
> Here are the xmls for the 3 components in the bundle:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0";
> name="net.leangen.expedition.integration.oauth2.credentials"
> activate="activate">
> <implementation
> class="net.leangen.expedition.integration.oauth2.client.ClientCredentialsService"/>
> <service>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"/>
> </service>
> <reference name="useradmin"
> interface="org.osgi.service.useradmin.UserAdmin"
> target="(!(method=oauth2.0))" field="useradmin"/>
> </scr:component>
>
> (I just added in the target filter. I could easily remove it again.)
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0";
> name="net.leangen.expedition.integration.oauth2.useradmin"
> activate="activate">
> <implementation
> class="net.leangen.expedition.integration.oauth2.useradmin.OAuthUserAdminService"/>
> <service>
>   <provide interface="org.osgi.service.useradmin.UserAdmin"/>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.OAuthUserAdmin"/>
> </service>
> <reference name="delegate"
> interface="org.osgi.service.useradmin.UserAdmin"
> target="(!(method=oauth2.0))" field="delegate"/>
> <reference name="oauth2"
> interface="net.leangen.expedition.integration.oauth2.model.OAuth2"
> field="oauth2"/>
> <property name="method" type="String" value="oauth2.0"/>
> </scr:component>
>
> (I just added in the target filter. I could easily remove it again.)
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0";
> name="net.leangen.expedition.integration.oauth2">
> <implementation
> class="net.leangen.expedition.integration.oauth2.client.OauthService"/>
> <service>
>   <provide
> interface="net.leangen.expedition.integration.oauth2.model.OAuth2"/>
> </service>
> <reference name="creds"
> interface="net.leangen.expedition.integration.oauth2.model.ClientCredentials"
> field="creds"/>
> </scr:component>
>
>
>
> Cheers,
> =David
>
>
> On May 4, 2016, at 3:07 PM, David Jencks <david.a.jen...@gmail.com> wrote:
>
> Maybe showing the component xml would be the quickest way to figure out
> the next step?  I suspect your filter isn’t quite right.  What are the
> service properties on the UserAdmin you aren’t supplying?
>
> david jencks
>
>
>
>
>
>

Reply via email to