WSO2 API Manager和Google Analytics

时间:2013-10-11 13:13:51

标签: google-analytics wso2 wso2-am api-manager

我已将我的API管理器配置为启用Google Analytics,并在API管理器中收到以下错误:

2013-10-10 13:31:12,869 [-] [HttpServerWorker-1] ERROR APIMgtGoogleAnalyticsTrackingHandler String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler.trackPageView(APIMgtGoogleAnalyticsTrackingHandler.java:69) at org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler.handleRequest(APIMgtGoogleAnalyticsTrackingHandler.java:49) at org.apache.synapse.rest.API.process(API.java:252) at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76) at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:63) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:191) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:455) at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:275) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

任何想法我可能做错了什么?

我的API Manager配置非常简单:

<GoogleAnalyticsTracking>
   <Enabled>true</Enabled>
   <TrackingID>UA-TrackingId-1</TrackingID>
</GoogleAnalyticsTracking>

1 个答案:

答案 0 :(得分:0)

我们在APIM中没有遇到谷歌分析这个问题。但是我们修复了可能的代码块。您可以尝试使用最新的APIM 1.5.0