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?