1
votes

On "publish" button click (current service state "Production") I am getting below error in WSO2 Governance Registry console.

Failed to invoke aspect: An exception occurred while executing handler chain. APIManager endpoint URL or credentials are not definedAPI Publish might fail**

Below is my WSO2 Gov reg configuration as described in this link.

<state id="Production">
                <datamodel>
                    <data name="transitionExecution">
                        <execution forEvent="Demote" class="org.wso2.carbon.governance.registry.extensions.executors.DemoteActionExecutor">
                        </execution>
                        <execution forEvent="Publish" class="org.wso2.carbon.governance.registry.extensions.executors.apistore.ApiStoreExecutor">
                                <parameter name="apim.endpoint" value="http://localhost:9763/store"/>
                                <parameter name="apim.username" value="admin"/>
                                <parameter name="apim.password" value="admin"/>
                                <parameter name="default.tier" value="Unlimited"/>
                                <parameter name="throttlingTier" value="Unlimited,Unlimited,Unlimited,Unlimited,Unlimited"/>
                        </execution>
                    </data>
                </datamodel>
                <transition event="Publish" target="Published.to.APIStore"/>
                <transition event="Demote" target="Testing"/>
            </state>
            <state id="Published.to.APIStore">                   
            </state> 

Stack trace:

[2014-03-06 15:43:30,623] ERROR {org.wso2.carbon.governance.custom.lifecycles.checklist.util.InvokeAspectUtil} - Failed to invoke action Publish of aspect Service LifeCycle on resource /_system/governance/branches/production/services/com/w3schools/www/webservices/1.2.0/Temp_Convert_Service. An exception occurred while execut ing handler chain. APIManager endpoint URL or credentials are not definedAPI Publish might fail org.wso2.carbon.registry.core.exceptions.RegistryException: An exception occurred while executing handler chain. APIManager endpoint URL or credentials are not def inedAPI Publish might fail at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2814) at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java:542) at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2550) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:384) at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1395) at org.wso2.carbon.governance.custom.lifecycles.checklist.util.InvokeAspectUtil.invokeAspect(InvokeAspectUtil.java:52) at org.wso2.carbon.governance.custom.lifecycles.checklist.services.LifecyclesAdminService.invokeAspect(LifecyclesAdminService.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)

Please suggest.

3

3 Answers

1
votes

This link in WSO2 docs affirms that you have to modify /repository/resources/lifecycles/configurations.xml, but I think this is incorrect. Infact in Greg 4.6.0 this file is no more used. Another version of it is stored in a small db and you MUST make changes from GReg administration console just go to Extensions->Configure->Lifecycles and edit ServiceLifeCycle with your APIM parameters.

1
votes

Use G-Reg version 5.0.0 and above and API manager 1.9.0 or 1.9.1. Refer the following documentation

https://docs.wso2.com/display/AM190/Integrating+with+WSO2+Governance+Registry

Thanks

Prasanna

0
votes

For apim endpoint use http://localhost:9763/ only instead of http://localhost:9763/store.