Can't get user information after login successfully in WSO2 Identity server

感情迁移 提交于 2020-01-05 04:22:08

问题


After login successfully into WSO IS with service URL (https://localhost:9443/services/")

I tried to get User Information as below :

 try {
                UserRealm realm = WSRealmBuilder.createWSRealm(serviceURL, authCookie, configCtx);

                UserStoreManager storeManager = realm.getUserStoreManager();

            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

But I had exception relating to this as below image. I can't get any info.

I tried and found out that the main error is I can't create ConfixContext with the following code :

configCtx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);

I also read about ConfigContext in the below link and tried with other methods in this link but I can't create configContext. http://axis.apache.org/axis2/java/core/apidocs/org/apache/axis2/context/ConfigurationContextFactory.html

I appreciate your help in this case. Thanks


回答1:


The problem is your runtime doesnt have org.wso2.carbon.user.api.UserStoreException class. Therefore you can't identify the real exception.

For now, just use Exception e instead, and see if you can log the real exception.



来源:https://stackoverflow.com/questions/39120408/cant-get-user-information-after-login-successfully-in-wso2-identity-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!