最近,我们将单实例API管理器从1.90升级到1.10。升级似乎大体上是成功的,但是任何时候我尝试在发布者中加载其中一项服务时,都会冻结,并且日志报告: Error while retrieving the lifecycle actions for lifecycle: APILifeCycle in lifecycle state: null at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.getAllLifecycleActions(GovernanceArtifactImpl.java:783) at org.wso2.carbon.apimgt.impl.APIProviderImpl.getAPILifeCycleData(APIProviderImpl.java:3306) ... 101 moreCaused by: org.wso2.carbon.registry.core.exceptions.RegistryException: Resource at '/_system/governance/apimgt/applicationdata/provider/<User>/<API>/v1/api' not associated with aspect 'APILifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getResourceAspect(EmbeddedRegistry.java:2592) at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getAspectActions(EmbeddedRegistry.java:2627) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getAspectActions(CacheBackedRegistry.java:474) at org.wso2.carbon.registry.core.session.UserRegistry.getAspectActionsInternal而且(我用替换了敏感信息): org.wso2.carbon.registry.core.exceptions.RegistryException: Resource at '/_system/governance/apimgt/applicationdata/provider/<USER>/<SERVICE>/v1/api' not associated with aspect 'APILifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getResourceAspect(EmbeddedRegistry.java:2592) at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getAspectActions(EmbeddedRegistry.java:2627) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getAspectActions(CacheBackedRegistry.java:474)我花了很多时间试图找到此错误而没有运气的代码(无论如何我都不是Java开发人员)。你们对导致此错误的原因有任何想法吗?所有已注册的服务都已在升级前注册。更新:如下所示,这是因为迁移失败。我深入研究,发现由于SQL错误导致迁移失败。在迁移客户端中,特别是文件MigrateFrom19To110.java,在第189行上,它正在执行Ad SQL语句:"UPDATE IDN_OAUTH2_ACCESS_TOKEN SET AUTHZ_USER = ? WHERE AUTHZ_USER = ?"这将引发此错误:Must declare the scalar variable "@P0WHERE"构建此语句的代码似乎有问题,因为@POWHERE似乎来自jdbc驱动程序代码。谁能对此给予更多的了解? 最佳答案 您在升级过程中是否运行迁移客户端?好像迁移没有正确进行。步骤在https://docs.wso2.com/display/AM1100/Upgrading+from+the+Previous+Release中给出我之所以这样说是因为,作为迁移的一部分,我们将“APILifeCycle”生命周期附加到了现有的api。由于错误表明api与生命周期无关,因此我可以猜测问题出在迁移上关于wso2 - WSO2 API Manager升级后错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35588205/ 10-16 22:56