User management with the JerseyNexusClient

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
bob
Reply | Threaded
Open this post in threaded view
|

User management with the JerseyNexusClient

bob
Hi,
I am trying to access the Subsystems Users and User in an OSGi Environment using the JerseyNexusClient, but getting an IllegalArgumentException (see below). I guess this is related to the way the required SubsystemProviders are retrieved, which only seems to work without additional effort in non-OSGi environments. In the cases of Privlileges and Roles I could bypass the problem by adding the according SubsystemFactories to my JerseyNexusClientFactory as follows:
...
JerseyNexusClientFactory jerseyNexusClientFactory = new JerseyNexusClientFactory(new JerseyPrivilegesSubsystemFactory(), new JerseyRolesSubsystemFactory());
...

Unfortunately there is no such JerseySubsystemFactory handling Users, at least I could not find one. So the question is, am I missing something here? Is there another way to handle this problem or do I have to work with pure REST-commands to gain access to the mentioned Subsystems?

Thanks in advance,
Bob
________________
Command:
----------
...
Users users = jerseyNexusClient.getSubsystem(Users.class);
...

Exception:
----------
java.lang.IllegalArgumentException: No org.sonatype.nexus.client.core.spi.SubsystemProvider was able to create a subsystem of typeorg.sonatype.nexus.client.core.subsystem.security.Users
        at org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.createSubsystem(JerseyNexusClient.java:194)
        at org.sonatype.nexus.client.internal.rest.AbstractNexusClient.getSubsystem(AbstractNexusClient.java:66)
        at com.cloudyle.paasplus.core.repository.client.impl.RepositoryClientImpl.init(RepositoryClientImpl.java:381)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_25]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
        at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[19:org.apache.aries.blueprint.core:1.4.0]
        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[19:org.apache.aries.blueprint.core:1.4.0]
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[19:org.apache.aries.blueprint.core:1.4.0]
        ... 29 more