简体   繁体   English

WSO2 API Manager升级后错误

[英]WSO2 API Manager Post Upgrade Error

We recently upgraded our Single Instance API Manager from 1.90 to 1.10. 我们最近将单实例API管理器从1.90升级到1.10。 Upgrade seemed to be mostly successful, but anytime I try to load one of the services in the publisher, it freezes up and the log reports: 升级似乎大部分都是成功的,但是当我尝试加载发布者中的一个服务时,它会冻结并且日志报告:

    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 more
Caused 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

And Also (I replaced sensitive info with <>): 而且(我用<>替换了敏感信息):

    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)

I have spent a ton of time trying to locate the code that this error occurs with no luck (I'm not a java developer anyway). 我花了很多时间试图找到这个错误发生的代码而没有运气(我不是一个java开发人员)。 Do you guys have any ideas on what is causing this error? 你们对导致这个错误的原因有什么看法吗? All of the services that are registered were registered pre-upgrade. 所有注册的服务都是在升级前注册的。

UPDATE: As suggested below, this is because the migration is failing. 更新:如下所示,这是因为迁移失败。 I dug in a little deeper and discovered that the migration is failing due to bad SQL. 我深入挖掘并发现由于错误的SQL导致迁移失败。 Within the migration client, specifically the file MigrateFrom19To110.java, on Line 189 it is executing an Ad Hoc SQL statement : 在迁移客户端中,特别是文件MigrateFrom19To110.java,在第189行,它正在执行Ad Hoc SQL语句:

"UPDATE IDN_OAUTH2_ACCESS_TOKEN SET AUTHZ_USER = ? WHERE AUTHZ_USER = ?"

This throws this error: 这会引发此错误:

Must declare the scalar variable "@P0WHERE"

It seems like there is something wrong with the code that is building this statement, because the @POWHERE seems to be coming from the jdbc driver code. 似乎构建此语句的代码有问题,因为@POWHERE似乎来自jdbc驱动程序代码。 Can anyone shed more light on this? 任何人都可以对此有所了解吗?

Did you run the migration client during the upgrade? 您是否在升级期间运行迁移客户端? seems like migration hasn't gone correctly. 似乎迁移没有正确进行。 Steps are given in https://docs.wso2.com/display/AM1100/Upgrading+from+the+Previous+Release 步骤在https://docs.wso2.com/display/AM1100/Upgrading+from+the+Previous+Release中给出

The reason I'm saying this is because as part of the migration we attach 'APILifeCycle' lifecycle to existing apis. 我说这是因为作为迁移的一部分,我们将'APILifeCycle'生命周期附加到现有的apis。 Since the error says the api is not associated with the lifecycle I can guess the problem is with the migration 由于错误说api与生命周期无关,我可以猜测问题在于迁移

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

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