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

时间:2015-09-17 20:35:18

标签: wso2 wso2-am synapse

我在Windows 2012 R2服务器上运行WSO2 API Manager,所有信息中心网址(例如https://localhost:9443/storehttps://localhost:9443/carbonhttps://localhost:9443/publisher都可正常运行。但是当我配置和部署(在carbon.super租户中)示例WeatherAPI Web服务并尝试通过/services/... URL到达时,即:

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

我收到以下错误页面:

> 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/...以下的所有路径似乎都会返回此错误页面。我检查了[WSO2]/repository/logs目录中的日志文件,但他们没有显示任何错误。

1 个答案:

答案 0 :(得分:1)

您正尝试从servlet端口9443访问服务。尝试使用8280 port。但是,APIM中API的端点看起来并不像您提到的那样。检查official WSO2 documentation

中给出的示例