You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following error is encountered when invoking APIs whereas a custom class mediator attached as a policy when analytics enabled.
ERROR - AnalyticsMetricsHandler Error Occurred when collecting data
java.lang.NullPointerException: null
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getBackendLatency_aroundBody54(SynapseAnalyticsDataProvider.java:404) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getBackendLatency(SynapseAnalyticsDataProvider.java:399) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getLatencies_aroundBody18(SynapseAnalyticsDataProvider.java:217) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getLatencies(SynapseAnalyticsDataProvider.java:215) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.wso2.carbon.apimgt.common.analytics.collectors.impl.SuccessRequestDataCollector.collectData(SuccessRequestDataCollector.java:71) ~[org.wso2.carbon.apimgt.common.analytics_9.20.74.289.jar:?]
at org.wso2.carbon.apimgt.common.analytics.collectors.impl.GenericRequestDataCollector.collectData(GenericRequestDataCollector.java:46) ~[org.wso2.carbon.apimgt.common.analytics_9.20.74.289.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.AnalyticsMetricsHandler.handleResponseOutFlow_aroundBody8(AnalyticsMetricsHandler.java:95) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.AnalyticsMetricsHandler.handleResponseOutFlow(AnalyticsMetricsHandler.java:81) ~[org.wso2.carbon.apimgt.gateway_9.20.74.295.jar:?]
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:188) ~[synapse-core_2.1.7.wso2v271_66.jar:2.1.7-wso2v271.66]
at org.example.AuthFailure.mediate(AuthFailure.java:53) ~[AuthFailure-1.0-SNAPSHOT.jar:?]
at org.apache.synapse.mediators.ext.ClassMediator.updateInstancePropertiesAndMediate(ClassMediator.java:182) ~[synapse-core_2.1.7.wso2v271_66.jar:2.1.7-wso2v271.66]
...
Steps to Reproduce
Get an APIM 4.1.0 U2-177 pack and enable analytics [1].
Implement and add the class mediator to the /lib folder.
Create a sample API and add the implementation as a custom policy in the request flow of a resource.
Invoke the API and the pointed error trace can be observed in the wso2carbon.log file.
Note : Noticed the same behaviour when adding a mediator as a custom policy.
Description
Following error is encountered when invoking APIs whereas a custom class mediator attached as a policy when analytics enabled.
Steps to Reproduce
Note : Noticed the same behaviour when adding a mediator as a custom policy.
[1] https://apim.docs.wso2.com/en/4.1.0/api-analytics/on-prem/elk-installation-guide/#step-1-configuring-api-manager
Version
4.1.0
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: