在组应用程序共享中使用wso2am-2.6.0
启用应用程序组共享时
<APIStore>
<GroupingExtractor>org.wso2.carbon.apimgt.impl.DefaultGroupIDExtractorImpl</GroupingExtractor>
无法从存储区生成令牌,出现以下异常
TID: [-1234] [] [2018-11-27 12:56:11,039] ERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} - Error occurred while issuing the access token for Client ID : 4t4aXBQTmW55av0KgGVuIseqGvAa, User ID null, Scope : [default] and Grant Type : client_credentials {org.wso2.carbon.identity.oauth2.OAuth2Service}
java.lang.NullPointerException
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.getApplicationByClientId(ApiMgtDAO.java:11516)
at org.wso2.carbon.apimgt.impl.utils.APIUtil.getApplicationByClientId(APIUtil.java:7426)
at org.wso2.carbon.apimgt.keymgt.issuers.APIMTokenIssuer.renewAccessTokenPerRequest(APIMTokenIssuer.java:157)
at org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.accessTokenNotRenewedPerRequest(AbstractAuthorizationGrantHandler.java:808)
at org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.issue(AbstractAuthorizationGrantHandler.java:129)
将代码回溯到
if (multiGroupAppSharingEnabled) {
if (application.getGroupId().isEmpty()) {
application.setGroupId(getGroupId(application.getId()));
}
}
问题的直接原因是application.getGroupID()为空。以及在数据库中。
我已经打开了一个问题
https://github.com/wso2/carbon-apimgt/issues/5874
但是我希望有一种方法可以使用应用程序组共享