WSO2使用mysql集群APIM和DAS,没有显示带有此错误的统计信息

时间:2016-10-13 03:29:00

标签: wso2 wso2-am wso2-das

  1. 聚类APIM分为4部分,发布者,商店,关键管理者,gataway。并使用DAS进行统计。数据库是mysql。

  2. 我在发布商节点上设置APIM和DAS之间的连接。

  3. 当我调用api时,APIM控制台会出现如下错误。

  4.  [2016-10-13 11:13:54,775] ERROR - APIMgtUsageHandler Cannot publish event. null
    java.lang.NullPointerException
            at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:124)
            at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler.handleRequest(APIMgtUsageHandler.java:169)
            at org.apache.synapse.rest.API.process(API.java:322)
            at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
            at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:65)
            at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
            at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
            at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
            at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
            at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:149)
            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:745)
    [2016-10-13 11:13:54,807] ERROR - APIMgtResponseHandler Cannot publish response event. null
    java.lang.NullPointerException
            at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:140)
            at org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler.mediate(APIMgtResponseHandler.java:211)
            at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84)
            at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
            at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
            at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
            at org.apache.synapse.rest.Resource.process(Resource.java:297)
            at org.apache.synapse.rest.API.process(API.java:335)
            at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
            at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
            at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
            at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
            at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
            at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
            at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:251)
            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:745)
    

1 个答案:

答案 0 :(得分:0)

为了解决这个问题,我与wso2的开发人员联系。

rukshan给了我this solution,在api-manager.xml上配置DAS,而不是在UI上配置。