繁体   English   中英

WSO2 API Manager 验证刷新令牌时出错

[英]WSO2 API Manager Error when validating a refresh Token

我已经将 WSO2 API 管理器设置为 SQL 服务器作为主要用户存储。 我们在其中配置了 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

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

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

MSSQL JDBC 驱动程序的此参数的完整详细信息在此处进行了很好的解释。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM