Re: [Dev] Aspect Intermittently disappearing in tenant mode
We could able to fix this with the help of SameeraM and Chandana. To resolve , we called to the org.wso2.carbon.governance.lcm.util.CommonUtil - addDefaultLifecyclesIfNotAvailable() method in the publisher login. CommonUtil.addDefaultLifecyclesIfNotAvailable(regService.getConfigSystemRegistry(tenantId), CommonUtil.getRootSystemRegistry(tenantId), false); Thanks SameeraM and Chandana for helping to resolve this. Regards, Dinusha. On Wed, Mar 18, 2015 at 10:36 AM, Sumedha Rubasinghe sume...@wso2.com wrote: Chandana/Sagara, Thanks for help extended so far. Appreciate if you guys can help further to isolate the issue as this has been a blocker and killing significant time @ the last hour. On Wed, Mar 18, 2015 at 9:05 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi Dinusha / All, Something to point out here is that in the scenario where everything functions as expected, the aspect map has all the tenant id related lifeycles as well. And everything gets resolved the moment you login to the carbon console as the tenant admin of the tenant for which this issue is coming. What i have been able to observe so far is that, when logging in to the carbon console as tenant admin, the only deviation to the flow.. and eventually what fixes the issue is calling of the following method. addDefaultLifecyclesIfNotAvailable() method in the governance.lcm.CommonUtil class. After calling this method the aspect map gets properly populated. We tried calling the method directly from jaggery, but the repeated calling of it relays errors, and didn't exactly fix the issue. Another very weird behavior we observed is that, the same class has a method called lifeCycleExists() this method checks if a particular lifecycle exists in a particular users registry. When calling this method, at the time of the error. It always returns true. Meaning the LC is available for that tenant. All things considered, i think we might have to do something related to the RegistryContext to get this issue resolved. Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : ruw...@wso2.com mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Tue, Mar 17, 2015 at 9:01 PM, Dinusha Senanayaka dinu...@wso2.com wrote: Hi ES team/ Registry team, This is a blocking issue for App Manager release. Appreciate some help on resolving this. Could able to notice following after debugging governance.api and registry.core code.. ES publisher calls to the GovernanceArtifactImpl.getAllLifecycleActions() where it get calls to the getAspectActions() method. This get calls to the EmbeddedRegistry.getAspect(String name) which returns the aspects by taking the CurrentSession.getCallerTenantId(). Refer following return statement. return registryContext.getAspect(name, *CurrentSession.getCallerTenantId()*); But, once we expand the above 'registryContext' object, it contains the lifecycle aspects in super tenant space (see the attached screenshot taken while debugging). Hence with the callerTenantId lifecycle aspects get return as null . If passing current tenantId to the getAspect is correct, then is there a way to register WebAppLifecycle aspects in tenant space as well ? Or could this be due to 'registryContext' object get initialed in wrong way ? Regards, Dinusha. On Thu, Mar 12, 2015 at 8:36 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi All, We are facing an issue [1],[2] in which the sometimes the Aspect (Life cycle for asset types) gets lost in the tenant mode. We have observed this happening intermittently, only in tenant mode though and a restart of the pack usually solves the problem. I heard from SameeraM that a similar issue was fixed in carbon 4.3, for the record we are still on carbon 4.2. Appreciate if somebody could point out a fix/approach to fix this. Error : ERROR - GovernanceArtifactImpl Error in associating lifecycle for the artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp. org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find aspectName 'WebAppLifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904) at org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1876) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1873) at java.security.AccessController.doPrivileged(Native Method) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspect(UserRegistry.java:1873)
Re: [Dev] Aspect Intermittently disappearing in tenant mode
Thank you guys! Appreciate the help. Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : ruw...@wso2.com mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Wed, Mar 18, 2015 at 7:20 PM, Dinusha Senanayaka dinu...@wso2.com wrote: We could able to fix this with the help of SameeraM and Chandana. To resolve , we called to the org.wso2.carbon.governance.lcm.util.CommonUtil - addDefaultLifecyclesIfNotAvailable() method in the publisher login. CommonUtil.addDefaultLifecyclesIfNotAvailable(regService.getConfigSystemRegistry(tenantId), CommonUtil.getRootSystemRegistry(tenantId), false); Thanks SameeraM and Chandana for helping to resolve this. Regards, Dinusha. On Wed, Mar 18, 2015 at 10:36 AM, Sumedha Rubasinghe sume...@wso2.com wrote: Chandana/Sagara, Thanks for help extended so far. Appreciate if you guys can help further to isolate the issue as this has been a blocker and killing significant time @ the last hour. On Wed, Mar 18, 2015 at 9:05 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi Dinusha / All, Something to point out here is that in the scenario where everything functions as expected, the aspect map has all the tenant id related lifeycles as well. And everything gets resolved the moment you login to the carbon console as the tenant admin of the tenant for which this issue is coming. What i have been able to observe so far is that, when logging in to the carbon console as tenant admin, the only deviation to the flow.. and eventually what fixes the issue is calling of the following method. addDefaultLifecyclesIfNotAvailable() method in the governance.lcm.CommonUtil class. After calling this method the aspect map gets properly populated. We tried calling the method directly from jaggery, but the repeated calling of it relays errors, and didn't exactly fix the issue. Another very weird behavior we observed is that, the same class has a method called lifeCycleExists() this method checks if a particular lifecycle exists in a particular users registry. When calling this method, at the time of the error. It always returns true. Meaning the LC is available for that tenant. All things considered, i think we might have to do something related to the RegistryContext to get this issue resolved. Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : ruw...@wso2.com mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Tue, Mar 17, 2015 at 9:01 PM, Dinusha Senanayaka dinu...@wso2.com wrote: Hi ES team/ Registry team, This is a blocking issue for App Manager release. Appreciate some help on resolving this. Could able to notice following after debugging governance.api and registry.core code.. ES publisher calls to the GovernanceArtifactImpl.getAllLifecycleActions() where it get calls to the getAspectActions() method. This get calls to the EmbeddedRegistry.getAspect(String name) which returns the aspects by taking the CurrentSession.getCallerTenantId(). Refer following return statement. return registryContext.getAspect(name, *CurrentSession.getCallerTenantId()*); But, once we expand the above 'registryContext' object, it contains the lifecycle aspects in super tenant space (see the attached screenshot taken while debugging). Hence with the callerTenantId lifecycle aspects get return as null . If passing current tenantId to the getAspect is correct, then is there a way to register WebAppLifecycle aspects in tenant space as well ? Or could this be due to 'registryContext' object get initialed in wrong way ? Regards, Dinusha. On Thu, Mar 12, 2015 at 8:36 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi All, We are facing an issue [1],[2] in which the sometimes the Aspect (Life cycle for asset types) gets lost in the tenant mode. We have observed this happening intermittently, only in tenant mode though and a restart of the pack usually solves the problem. I heard from SameeraM that a similar issue was fixed in carbon 4.3, for the record we are still on carbon 4.2. Appreciate if somebody could point out a fix/approach to fix this. Error : ERROR - GovernanceArtifactImpl Error in associating lifecycle for the artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp. org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find aspectName 'WebAppLifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904) at org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60) at
Re: [Dev] Aspect Intermittently disappearing in tenant mode
Chandana/Sagara, Thanks for help extended so far. Appreciate if you guys can help further to isolate the issue as this has been a blocker and killing significant time @ the last hour. On Wed, Mar 18, 2015 at 9:05 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi Dinusha / All, Something to point out here is that in the scenario where everything functions as expected, the aspect map has all the tenant id related lifeycles as well. And everything gets resolved the moment you login to the carbon console as the tenant admin of the tenant for which this issue is coming. What i have been able to observe so far is that, when logging in to the carbon console as tenant admin, the only deviation to the flow.. and eventually what fixes the issue is calling of the following method. addDefaultLifecyclesIfNotAvailable() method in the governance.lcm.CommonUtil class. After calling this method the aspect map gets properly populated. We tried calling the method directly from jaggery, but the repeated calling of it relays errors, and didn't exactly fix the issue. Another very weird behavior we observed is that, the same class has a method called lifeCycleExists() this method checks if a particular lifecycle exists in a particular users registry. When calling this method, at the time of the error. It always returns true. Meaning the LC is available for that tenant. All things considered, i think we might have to do something related to the RegistryContext to get this issue resolved. Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : ruw...@wso2.com mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Tue, Mar 17, 2015 at 9:01 PM, Dinusha Senanayaka dinu...@wso2.com wrote: Hi ES team/ Registry team, This is a blocking issue for App Manager release. Appreciate some help on resolving this. Could able to notice following after debugging governance.api and registry.core code.. ES publisher calls to the GovernanceArtifactImpl.getAllLifecycleActions() where it get calls to the getAspectActions() method. This get calls to the EmbeddedRegistry.getAspect(String name) which returns the aspects by taking the CurrentSession.getCallerTenantId(). Refer following return statement. return registryContext.getAspect(name, *CurrentSession.getCallerTenantId()*); But, once we expand the above 'registryContext' object, it contains the lifecycle aspects in super tenant space (see the attached screenshot taken while debugging). Hence with the callerTenantId lifecycle aspects get return as null . If passing current tenantId to the getAspect is correct, then is there a way to register WebAppLifecycle aspects in tenant space as well ? Or could this be due to 'registryContext' object get initialed in wrong way ? Regards, Dinusha. On Thu, Mar 12, 2015 at 8:36 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi All, We are facing an issue [1],[2] in which the sometimes the Aspect (Life cycle for asset types) gets lost in the tenant mode. We have observed this happening intermittently, only in tenant mode though and a restart of the pack usually solves the problem. I heard from SameeraM that a similar issue was fixed in carbon 4.3, for the record we are still on carbon 4.2. Appreciate if somebody could point out a fix/approach to fix this. Error : ERROR - GovernanceArtifactImpl Error in associating lifecycle for the artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp. org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find aspectName 'WebAppLifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904) at org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1876) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1873) at java.security.AccessController.doPrivileged(Native Method) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspect(UserRegistry.java:1873) at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.attachLifecycle(GovernanceArtifactImpl.java:276) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
Re: [Dev] Aspect Intermittently disappearing in tenant mode
Hi Dinusha / All, Something to point out here is that in the scenario where everything functions as expected, the aspect map has all the tenant id related lifeycles as well. And everything gets resolved the moment you login to the carbon console as the tenant admin of the tenant for which this issue is coming. What i have been able to observe so far is that, when logging in to the carbon console as tenant admin, the only deviation to the flow.. and eventually what fixes the issue is calling of the following method. addDefaultLifecyclesIfNotAvailable() method in the governance.lcm.CommonUtil class. After calling this method the aspect map gets properly populated. We tried calling the method directly from jaggery, but the repeated calling of it relays errors, and didn't exactly fix the issue. Another very weird behavior we observed is that, the same class has a method called lifeCycleExists() this method checks if a particular lifecycle exists in a particular users registry. When calling this method, at the time of the error. It always returns true. Meaning the LC is available for that tenant. All things considered, i think we might have to do something related to the RegistryContext to get this issue resolved. Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : ruw...@wso2.com mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Tue, Mar 17, 2015 at 9:01 PM, Dinusha Senanayaka dinu...@wso2.com wrote: Hi ES team/ Registry team, This is a blocking issue for App Manager release. Appreciate some help on resolving this. Could able to notice following after debugging governance.api and registry.core code.. ES publisher calls to the GovernanceArtifactImpl.getAllLifecycleActions() where it get calls to the getAspectActions() method. This get calls to the EmbeddedRegistry.getAspect(String name) which returns the aspects by taking the CurrentSession.getCallerTenantId(). Refer following return statement. return registryContext.getAspect(name, *CurrentSession.getCallerTenantId()*); But, once we expand the above 'registryContext' object, it contains the lifecycle aspects in super tenant space (see the attached screenshot taken while debugging). Hence with the callerTenantId lifecycle aspects get return as null . If passing current tenantId to the getAspect is correct, then is there a way to register WebAppLifecycle aspects in tenant space as well ? Or could this be due to 'registryContext' object get initialed in wrong way ? Regards, Dinusha. On Thu, Mar 12, 2015 at 8:36 AM, Ruwan Yatawara ruw...@wso2.com wrote: Hi All, We are facing an issue [1],[2] in which the sometimes the Aspect (Life cycle for asset types) gets lost in the tenant mode. We have observed this happening intermittently, only in tenant mode though and a restart of the pack usually solves the problem. I heard from SameeraM that a similar issue was fixed in carbon 4.3, for the record we are still on carbon 4.2. Appreciate if somebody could point out a fix/approach to fix this. Error : ERROR - GovernanceArtifactImpl Error in associating lifecycle for the artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp. org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find aspectName 'WebAppLifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904) at org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1876) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1873) at java.security.AccessController.doPrivileged(Native Method) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspect(UserRegistry.java:1873) at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.attachLifecycle(GovernanceArtifactImpl.java:276) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.mozilla.javascript.gen.artifacts_17._c_anonymous_19(artifacts:257) at
[Dev] Aspect Intermittently disappearing in tenant mode
Hi All, We are facing an issue [1],[2] in which the sometimes the Aspect (Life cycle for asset types) gets lost in the tenant mode. We have observed this happening intermittently, only in tenant mode though and a restart of the pack usually solves the problem. I heard from SameeraM that a similar issue was fixed in carbon 4.3, for the record we are still on carbon 4.2. Appreciate if somebody could point out a fix/approach to fix this. Error : ERROR - GovernanceArtifactImpl Error in associating lifecycle for the artifact. id: a1954c0e-a67e-46b4-ae28-1b063d816a1f, path: /appmgt/applicationdata/provider/admin-AT-test.com/AppT01/1.0/webapp. org.wso2.carbon.registry.core.exceptions.RegistryException: Couldn't find aspectName 'WebAppLifeCycle' at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.associateAspect(EmbeddedRegistry.java:2428) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.associateAspect(CacheBackedRegistry.java:416) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspectInternal(UserRegistry.java:1904) at org.wso2.carbon.registry.core.session.UserRegistry.access$3800(UserRegistry.java:60) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1876) at org.wso2.carbon.registry.core.session.UserRegistry$39.run(UserRegistry.java:1873) at java.security.AccessController.doPrivileged(Native Method) at org.wso2.carbon.registry.core.session.UserRegistry.associateAspect(UserRegistry.java:1873) at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.attachLifecycle(GovernanceArtifactImpl.java:276) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.mozilla.javascript.gen.artifacts_17._c_anonymous_19(artifacts:257) at org.mozilla.javascript.gen.artifacts_17.call(artifacts) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.modules.ext.scripts.c5._c_anonymous_2(/publisher/modules/ext/scripts/asset.lifecycle.action.save.js:47) at org.jaggeryjs.rhino.publisher.modules.ext.scripts.c5.call(/publisher/modules/ext/scripts/asset.lifecycle.action.save.js) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.publisher.modules.ext.core.c2._c_anonymous_14(/publisher/modules/ext/core/extension.core.js:235) at org.jaggeryjs.rhino.publisher.modules.ext.core.c2.call(/publisher/modules/ext/core/extension.core.js) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.publisher.modules.ext.core.c3._c_anonymous_10(/publisher/modules/ext/core/extension.management.js:161) at org.jaggeryjs.rhino.publisher.modules.ext.core.c3.call(/publisher/modules/ext/core/extension.management.js) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.modules.ext.core.c3._c_anonymous_8(/publisher/modules/ext/core/extension.management.js:111) at org.jaggeryjs.rhino.publisher.modules.ext.core.c3.call(/publisher/modules/ext/core/extension.management.js) at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) at org.jaggeryjs.rhino.publisher.assets.default.c1._c_anonymous_8(/publisher/assets/default/asset.jag:303) at org.jaggeryjs.rhino.publisher.assets.default.c1.call(/publisher/assets/default/asset.jag) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.publisher.modules.c4._c_anonymous_12(/publisher/modules/router-g.js:183) at org.jaggeryjs.rhino.publisher.modules.c4.call(/publisher/modules/router-g.js) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.assets.default.c1._c_anonymous_1(/publisher/assets/default/asset.jag:578) at org.jaggeryjs.rhino.publisher.assets.default.c1.call(/publisher/assets/default/asset.jag) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at