WSO2 API Manager /services/...抛出 NullPointerException

WSO2 API Manager /services/... throw a NullPointerException

我在 Windows 2012 R2 服务器和所有仪表板 URL 上安装了 WSO2 API 管理器 运行,例如 https://localhost:9443/storehttps://localhost:9443/carbon,https://localhost:9443/publisher 工作正常。但是当我配置和部署(在 carbon.super 租户中)示例 WeatherAPI Web 服务并尝试通过 /services/... URL 访问它时,即:

https://localhost:9443/services/weather/1.0.0/*?q=Amsterdam

我收到以下错误页面 returned:

> HTTP Status 500 - 
> 
> 
> type Exception report
> 
> message 
> 
> description The server encountered an internal error that prevented it
> from fulfilling this request.
> 
> exception  org.apache.axis2.AxisFault
>   org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>   org.wso2.carbon.core.transports.CarbonServlet.doGet(CarbonServlet.java:155)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>   org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>   org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>   org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
> 
> 
> 
> root cause  java.lang.NullPointerException
>   org.apache.synapse.rest.RESTUtils.getFullRequestPath(RESTUtils.java:80)
>   org.apache.synapse.rest.API.canProcess(API.java:179)
>   org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:79)
>   org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:64)
>   org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
>   org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
>   org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>   org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
>   org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
>   org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837)
>   org.wso2.carbon.core.transports.CarbonServlet.handleRestRequest(CarbonServlet.java:303)
>   org.wso2.carbon.core.transports.CarbonServlet.doGet(CarbonServlet.java:152)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>   org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>   org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>   org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)

当我在租户中创建自己的 Web 服务并部署它时,我遇到了同样的错误。所以我可能配置错误,但不知道去哪里找。 /services/... 以下的所有路径似乎 return 此错误页面。我检查了 [WSO2]/repository/logs 目录中的日志文件,但它们没有显示任何错误。

您正在尝试从 servlet 端口 9443 访问服务。尝试使用 8280 port . However, the endpoint of the API in APIM does not look like as you mention. Check the example given in the official WSO2 documentation