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
Related
I migrated from Airflow 1.10.15 to Airflow 2.1.0. I followed the guidelines in Airflow docs to migrate with that release as a bridge version. Everything works like a charm but i receive the following output in the logs:
I did not experienced any bug or something at least for now. I can't find any info about this in the airflow community neither in the docs. Any idea of what does it mean? And how to mitigate it?
This is an annoying warning that shows up during migration from 1.10.x to 2.x, but it's not reflective of an actual problem, so you can disregard it.
The reason for this is that I wrote a migration to standardize permission names between the UI and the API. This involves unwinding existing permissions from existing roles and adding them back with the updated names. The warning means a migration is attempting to run a step out of sequence.
This is a known issue that has proved surprisingly tricky to fix, but it won't prevent the proper permissions from getting added. I'll try to add the fix to an upcoming bug release (2.1.1 or 2.1.2).
I have pushed my textract code on staging server, and now I am receiving an error.
It is working on a development system. I can't understand why it is happening.
I am using dotnet core 3.0
I am following code sample provided here. [https://github.com/aws-samples/amazon-textract-code-samples/tree/master/src-csharp]
I have a doubt regarding IAM credentials. For this, I installed AWS SDK tools for Windows and AWS CLI on staging server and, after that, ran commands (mentioned here [https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration] ) using Command prompt for configuring. I thought it (IAM) might be getting saved into the environment. But no success.
Code which uploads a file on S3 bucket is uploading it, but while making a request to Textract service, it is crashing.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request)
I can't understand what's the issue.
On development, it is working.
Any help?
Finally we found solution. It was very weird issue, never thought it will come.
First thing
Message thrown by API was not clear. So we hosted it on some other server which had upgraded windows OS. There we came to know it is related to keys which was generated during creation of IAM user.
Second thing
Although we got cleared that our application (Amazon's Textract dll) is not able to read keys which we configured from here .
When we configure through CLI, it creates two files for saving credentials and read it from here. Refer below screen shot.
It was there but still application was not able to locate it on staging server. After searching for 4-5 days talking to the AWS support nothing happened.
Finally we dived into IIS made few changes and came to know it is happening at IIS. In IIS there is setting in Appool of instance it was Load User Profile.. By default it come as false but when we turned as true it crated a user like we have user for system log-in.
Refer below screen shots for changing this.
It creates user like this.
Hope it helps some one
I was adding modules and installing them yesterday and I get this error now: "The website encountered an unexpected error. Please try again later." I can't login at all or access anything from the url. I tried deleting the modules but it still isn't working. Any suggestions?
To expose what's up, add the following line to your settings.php
$config['system.logging']['error_level'] = 'verbose';
What's happening is that the code is failing fairly deep into the execution and it may not even be a syntax error. In my case, it was the MySQL user was not associated with the MySQL DB, so the connection was failing as what the application
The models are probably still in database even though you deleted it from code ?
If you have access to drush, you can in-install it via drush. If not you need to change entries in the database tables
My problem is peciluar, Please assist me in any way if you can !!
I have around more than 1300 of hibernate entity files, which are by default loaded with lazy intilization. I deployed them with tomcat and able to run web services using them with cxf, the application runs successfuly. With the same enity files, I made a budle in Fuse, the services are been deployed , while running the application , it gives an error saying "Failed to lazily initialize a collection of role" with entity names.
Now for this I came with one solution that at place of
#ManyToMany(fetch = FetchType.LAZY, mappedBy = "prProductLines") , I changed the FetechType with Lazy to EAGER. The problem get resolved.
But now, while changing at all places the fetch type to EAGER, this modification raised me another problem, where the query runs very slow taking too much long time, finally it reports error in SQl server 2008 with "There is insufficient system memory in resource pool 'internal' to run this query." and in console "org.hibernate.exception.SQLGrammarException: could not load an entity"
Now please suggest me the solution for it, if I am able to lazily initiaze it in fuse, I hope it could solve my problem. I am not able to figure out exact problem. How could i move ahead.
Thank you
i'm stuck in this problem from many days in wso2 governance registry version 4.1.1
After promoting a service to development state from configuration (a new state that i've defined in my custom lifecycle) i'm trying to save the service.
If i dont't make any changes to content details, saving procedure fail returning this error message
" Resource does not exist at path /_system/governance/{serviceName}"
on the other hand modifying at least one field in service content, no error appears.
I found this fix
http://mail.wso2.org/mailarchive/carbon-commits/2012-January/053562.html
but seems not fix my problem.
Anyone can help me?