Re: [Dev] Unable to load UserStoreCountRetriever implementation

2017-09-13 Thread Pushpalanka Jayawardhana
Hi Hartley,

It is not directly the retriever class that you have to write. As we have
followed factory pattern here, you have to write the factory class and
configure that in the advanced property.

Code segment at [1] with help you understand how the factory is registered
to OSGI runtime and [2] can be referred as sample implementation.
Hope this will help.

[1] -
https://github.com/wso2/carbon-identity-framework/blob/master/components/user-store/org.wso2.carbon.identity.user.store.count/src/main/java/org/wso2/carbon/identity/user/store/count/internal/UserStoreCountDSComponent.java#L92-L99
[2] -
https://github.com/wso2/carbon-identity-framework/tree/master/components/user-store/org.wso2.carbon.identity.user.store.count/src/main/java/org/wso2/carbon/identity/user/store/count/jdbc

Thanks,

On Mon, Sep 11, 2017 at 11:14 PM, J R Hartley 
wrote:

> I have successfully created a UserStoreManager implementation which loads
> correctly via a component class. However, I need a UserStoreCountRetriever
> implementation to allow the user store to work correctly. I have extended 
> JDBCUserStoreCountRetriever
> and added the class name to the Count Implementation advanced property. I
> have also registered the service in my component.
>
> When I do a user search I get the following message: "Error while listing
> users. Error is : Exception occurred while trying to invoke service method
> countUsers".
>
> On the console, I get the following stack trace:
> Caused by: java.lang.NullPointerException
> at org.wso2.carbon.identity.user.store.count.util.
> UserStoreCountUtils.getCounterInstanceForDomain(
> UserStoreCountUtils.java:136)
>
> It looks like it can't find, or can't load the class required to implement
> the count. The class is in the same jar file as the user store.
>
> Many thanks
>
> Jeff
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Pushpalanka.
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Unable to load UserStoreCountRetriever implementation

2017-09-11 Thread J R Hartley
I have successfully created a UserStoreManager implementation which loads
correctly via a component class. However, I need a UserStoreCountRetriever
implementation to allow the user store to work correctly. I have
extended JDBCUserStoreCountRetriever and added the class name to the Count
Implementation advanced property. I have also registered the service in my
component.

When I do a user search I get the following message: "Error while listing
users. Error is : Exception occurred while trying to invoke service method
countUsers".

On the console, I get the following stack trace:
Caused by: java.lang.NullPointerException
at
org.wso2.carbon.identity.user.store.count.util.UserStoreCountUtils.getCounterInstanceForDomain(UserStoreCountUtils.java:136)

It looks like it can't find, or can't load the class required to implement
the count. The class is in the same jar file as the user store.

Many thanks

Jeff
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev