[WSO2 API管理员,验证刷新令牌时出错

问题描述 投票:0回答:1

我已经设置了一个带有SQL Server作为主要用户存储的WSO2 API管理器。并且我们已经在其中配置了API列表。验证刷新令牌错误时,我们经常会收到错误消息。可能是什么原因?

TID: [-1234] [] [2019-09-26 18:28:02,274] ERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Error occurred while issuing the access token for Client ID : oQL_XBIHH75J2qj_ixQ2V_siKbMa, User ID null, Scope : [default] and Grant Type : refresh_token {org.wso2.carbon.identity.oauth2.OAuth2Service}
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception: Error when validating a refresh token

    at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.validateRefreshToken(TokenMgtDAO.java:923)
    at org.wso2.carbon.identity.oauth2.token.handlers.grant.RefreshGrantHandler.issue(RefreshGrantHandler.java:167)
    at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(AccessTokenIssuer.java:257)
    at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:223)
    at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.getAccessToken(OAuth2TokenEndpoint.java:287)
    at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:151)
    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)


Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 164) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4700)
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1683)
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:956)
    at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.validateRefreshToken(TokenMgtDAO.java:883)
    ... 57 more
sql-server wso2is wso2-am
1个回答
0
投票

您需要在/repository/conf/datasources/master-datasources.xml中的数据源配置中设置SendStringParametersAsUnicode参数更改指向MSSQL数据库的数据源上的datasource url参数,

<url>jdbc:sqlserver://MSSQL_URL:5023;databaseName=SSO_INTERNAL_540;encrypt=true;trustServerCertificate=true;SendStringParametersAsUnicode=false</url>

here中详细解释了MSSQL JDBC驱动程序此参数的详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.