问题
I'm setting up the API Manager Import and Export tooling for which we need deploy "api-import-export-2.6.0-v10.war" file to "/repository/deployment/server/webapps folder" where as it is throwing an error. StandardContext Servlet [JAXServlet] in web application [/api-import-export-2.6.0-v10] threw load() exception
I'm using API Manager 2.6.0 and deployed "api-import-export-2.6.0-v10.war" which is of same version .war file. Tried another system where the error was same.
ERROR - StandardContext Servlet [JAXServlet] in web application [/api-import-export-2.6.0-v10] threw load() exception java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet
回答1:
Try a previous version of the jar and let me know if it works.
回答2:
To use the latest war file, you need to WUM update WSO2 APIM 2.6.0. You are getting this error as you have not WUM updated the WSO2 APIM 2.6.0. In the docs, under step 1 you can get the previous version[1] or you can WUM update WSO2 API Manager following [2].
[1] - https://docs.wso2.com/display/AM260/Migrating+the+APIs+and+Applications+to+a+Different+Environment [2] - https://docs.wso2.com/display/AM260/Updating+WSO2+API+Manager
回答3:
I have sorted out the issue in my case as version compatibility among apimcli, import/export war file and WSO2 API-M server.
Issue was occurred due to the version (api-import-export-2.6.0-v10) mentioned as compatible by WSO2 not working properly with our APIM server and tried lowering the version and worked properly now.
WSO2 API-M version: 2.6.0 Import/Export tool version: APIMCLI v2.0.1 [Zip file downloaded for apimcli is ready for use no additional config was needed in my case] Import/Export WAR file version: api-import-export-2.5.0-v1 [war file has been hot deployed to below path wso2am/2.6.0/repository/deployment/server/webapps/]
Below Commands executed:
Exported an already created API from DEV environment: $ ./apimcli export-api -n ProfileManagementNJ -v v1.0.0 -r admin -e dev -k
Successfully exported API! Find the exported API at /home/stwso2/.wso2apimcli/exported/apis/dev/ProfileManagementNJ_v1.0.0.zip
Imported the above exported API to ST environment: $ ./apimcli import-api -k -f /home/stwso2/.wso2apimcli/exported/apis/dev/ProfileManagementNJ_v1.0.0.zip -e st --preserve-provider false
Successfully imported API
Actual error message details can be found as in below and are captured from console log: $ ./apimcli export-api -n ProfileManagementNJ -v 1.0.0 -r admin -e st -k --verbose
Executed ImportExportCLI (apimcli) on Wed, 30 Oct 2019 13:41:52 UTC
[INFO]: Insecure: true
[INFO]: export-api called
[INFO]: ExportAPI: URL: https://172.26.41.4:9443/api-import-export-2.6.0-v10/export-api?name=ProfileManagementNJ&version=1.0.0&provider=admin&preserveStatus=true
apimcli: Error while exporting Reason: Get https://172.26.41.4:9443/carbon/admin/login.jsp: Auto redirect is disabled
Exit status 1
For more details on apimcli setup: https://docs.wso2.com/display/AM260/Migrating+the+APIs+to+a+Different+Environment#Example-exportAPI
来源:https://stackoverflow.com/questions/57621563/migrating-the-wso2-apis-and-applications-to-a-different-environment