I exported an API package(in .zip format) from wso2 am 1.9.0, later I used this package to import the API to a wso2 1.10.0 installation. It failed with the following error messages, notably "java.lang.NoSuchMethodError: org.wso2.carbon.context.CarbonContext.getCurrentContext()Lorg/wso2/carbon/context/CarbonContext;":
==> .../repository/logs/wso2-apigw-errors.log <==
2016-07-12 04:51:59,823 [-] [http-nio-9443-exec-44] ERROR AbstractFaultChainInitiatorObserver Error occurred during error handling, give up!
org.apache.cxf.interceptor.Fault: org.wso2.carbon.context.CarbonContext.getCurrentContext()Lorg/wso2/carbon/context/CarbonContext;
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170) ...
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) ...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.wso2.carbon.context.CarbonContext.getCurrentContext()Lorg/wso2/carbon/context/CarbonContext;
at apim.restful.importexport.utils.AuthenticatorUtil.authorizeUser(AuthenticatorUtil.java:88)
at apim.restful.importexport.APIService.importAPI(APIService.java:171)
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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
... 43 more
I am using api-import-export-v0.9.1 to import/export APIs from wso2 am 1.9.0 to 1.10.0.
What is wrong here? Why "NoSuchMethodError: org.wso2.carbon.context.CarbonContext.getCurrentContext()"? Did I use the right import/export tool/version? Any WIKI/documentations about it other than the one in WSO2 web site? Thanks for any tips in advance.
Did anyone get API import working? I also exported APIs from wso2 am 1.10.0 and import to the same 1.10.0 am server, it failed with the same "java.lang.NoSuchMethodError: org.wso2.carbon.context.CarbonContext.getCurrentContext()Lorg/wso2/carbon/context/CarbonContext".