简体   繁体   中英

WSO2 API Manager Post Upgrade Error

We recently upgraded our Single Instance API Manager from 1.90 to 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). 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. Within the migration client, specifically the file MigrateFrom19To110.java, on Line 189 it is executing an Ad Hoc SQL statement :

"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. 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

The reason I'm saying this is because as part of the migration we attach 'APILifeCycle' lifecycle to existing apis. Since the error says the api is not associated with the lifecycle I can guess the problem is with the migration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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