我已将我的 API Manager 配置为启用谷歌分析,并在 API Manager 中收到以下错误:
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>