Использование 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 () имеет значение null.Как и в базе данных.
Я уже открыл проблему https://github.com/wso2/carbon-apimgt/issues/5874
, но я надеюсь, что есть способ обойтись с помощью совместного использования групп приложений