Skip to content

[Pattern 6] NPE thrown when "DataPublisher" is set to false in Gateway Manager Node #63

@jsonds

Description

@jsonds

Description:
When a cluster is configured using the pattern 6 scripts [1]. A NPE is thrown on every api invocation. Please find the stacktrace below.

Was able to overcome this by setting the "DataPublisher" to true [2] in gateway manager's apim-manager.xml. Refer dev mail - "Error while publishing throttling events to global policy server"

TID: [-1234] [] [2018-01-26 14:07:41,822] ERROR {org.wso2.carbon.apimgt.gateway.throttling.publisher.ThrottleDataPublisher} -  Error while publishing throttling events to global policy server {org.wso2.carbon.apimgt.gateway.throttling.publisher.ThrottleDataPublisher}
java.lang.NullPointerException
    at org.wso2.carbon.apimgt.gateway.throttling.publisher.ThrottleDataPublisher.publishNonThrottledEvent(ThrottleDataPublisher.java:119)
    at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.doRoleBasedAccessThrottlingWithCEP(ThrottleHandler.java:349)
    at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.doThrottle(ThrottleHandler.java:512)
    at org.wso2.carbon.apimgt.gateway.handlers.throttling.ThrottleHandler.handleRequest(ThrottleHandler.java:460)
    at org.apache.synapse.rest.API.process(API.java:325)
    at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:90)
    at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304)
    at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:330)
    at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:159)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

[1] https://github.com/wso2/puppet-apim/blob/v2.1.0/wso2am_runtime/hieradata/dev/wso2/wso2am_runtime/pattern-6

[2] https://github.com/wso2/puppet-apim/blob/v2.1.0/wso2am_runtime/hieradata/dev/wso2/wso2am_runtime/pattern-6/gateway-manager.yaml#L98

Suggested Labels:
Bug, APIM 2.1.0, Pattern 6

Affected Product Version:
APIM 2.1.0 (wum updated 25/01/2018)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions