具有WSO2AM 2.1.0-update12(使用mysql)以及以下用例
无论如何更新应用程序密钥都会失败(此堆栈来自使用默认的h2数据库)
Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement " SELECT AKM.CONSUMER_KEY FROM AM_APPLICATION APP, AM_APPLICATION_KEY_MAPPING AKM, AM_SUBSCRIBER SUB WHERE SUB.SUBSCRIBER_ID=APP.SUBSCRIBER_ID AND APP.APPLICATION_ID = AKM.APPLICATION_ID AND APP.NAME = ? AND AKM.KEY_TYPE=? AND ( (APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM AM_APPLICATION_GROUP_MAPPING WHERE GROUP_ID IN ($PARAMS[*]) AND TENANT = ?)) OR LOWER(SUB.USER_ID) = ?) "; expected "[, ::, *, /, %, +, -, ||, ~, !~, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
SELECT AKM.CONSUMER_KEY FROM AM_APPLICATION APP, AM_APPLICATION_KEY_MAPPING AKM, AM_SUBSCRIBER SUB WHERE SUB.SUBSCRIBER_ID=APP.SUBSCRIBER_ID AND APP.APPLICATION_ID = AKM.APPLICATION_ID AND APP.NAME = ? AND AKM.KEY_TYPE=? AND ( (APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM AM_APPLICATION_GROUP_MAPPING WHERE GROUP_ID IN ($params) AND TENANT = ?)) OR lower(SUB.USER_ID) = ?) [42001-175]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
现在该应用程序似乎可以正常运行,但是代码授予未选中,因此无法再次设置
org.wso2.carbon.apimgt.api.APIManagementException: Error when reading the application information from the persistence store.
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.handleException(ApiMgtDAO.java:6399)
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.getConsumerKeyForApplicationKeyType(ApiMgtDAO.java:4799)
at org.wso2.carbon.apimgt.impl.APIConsumerImpl.updateAuthClient(APIConsumerImpl.java:3313)
at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.updateAuthClient(UserAwareAPIConsumer.java:34)
...
Caused by: java.sql.SQLException: Parameter index out of range (9 > number of parameters, which is 4).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
有什么办法可以解决或补偿吗? (不要失去代码授权)
注意:我们创建了一些扩展(用户存储管理器,组提取器,AuthorizationHandler),其中一些与较新版本不兼容