KB Article #181181
Log Message Payload Filter NPE error on 77 version on Docker
Policy 1:

Policy 2:

Problem
When using the "Log Message Payload" filter the following behavior has been observed in customer environment but not reproduced by support engineer in a test environment. Customer used the first policy in: APIM->inbound->OAUTH (Ext) ->general->Token information policy="name of policy1" to get the strange error.
Having 2 policies (see above), where the "policy shortcut" calls the second policy, the FORMAT of the "Log Message Payload" has to be configured as:
- << ${timestamp} ${id} ${filterName} ${payload} >> for the "Log Message Payload" in the first policy and
-<<X ${timestamp} ${id} ${filterName} ${payload} >>for the "Log Message Payload" in the second (the one that is called with the shortcut) policy
The idea is that if the ${timestamp} is null (customer case), the error is reported ONLY in the second policy, error being (see below). In order to avoid the error, the FORMAT in the second policy should not start with <<${timestamp}>> but with something else like <<X >> (see above).
ERROR 8/25/20, 23:51:51.155 java exception:
java.lang.RuntimeException: java.lang.NullPointerException
at com.vordel.log.rolloverfile.TextRollOverLogger.logMessagePayload(TextRollOverLogger.java:100)
at com.vordel.log.LogManager.logMessagePayload(LogManager.java:179)
at com.vordel.log.Log.logMessagePayload(Log.java:70)
at com.vordel.circuit.MessageProcessor.logMessagePayload(MessageProcessor.java:139)
at com.vordel.circuit.log.LogMessagePayloadProcessor.invoke(LogMessagePayloadProcessor.java:75)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:149)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:41)
at com.vordel.circuit.CircuitDelegateProcessor.invoke(CircuitDelegateProcessor.java:46)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:149)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:41)
at com.vordel.circuit.InvocationEngine.recordCircuitInvocation(InvocationEngine.java:279)
at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.java:241)
at com.vordel.apiportal.runtime.OAuthExternalDevice.validateByTokenInfoPolicy(OAuthExternalDevice.java:181)
at com.vordel.apiportal.runtime.OAuthExternalDevice.validateOAuthToken(OAuthExternalDevice.java:148)
at com.vordel.apiportal.runtime.OAuthSecurityDeviceBase.authenticateEx(OAuthSecurityDeviceBase.java:60)
at com.vordel.apiportal.runtime.OAuthSecurityDeviceBase.authenticate(OAuthSecurityDeviceBase.java:36)
at com.vordel.coreapireg.runtime.broker.OrderedSecurityDevice.authenticate(OrderedSecurityDevice.java:31)
at com.vordel.apiportal.runtime.Broker.authenticate(Broker.java:390)
at com.vordel.apiportal.runtime.Broker.authenticateSetResponse(Broker.java:195)
at com.vordel.apiportal.runtime.Broker.invokeMethod(Broker.java:129)
at com.vordel.coreapireg.runtime.CoreApiBroker.processRequest(CoreApiBroker.java:208)
at com.vordel.apiportal.runtime.Broker.processRequest(Broker.java:100)
at com.vordel.apiportal.runtime.virtualized.VApiRuntime.processRequest(VApiRuntime.java:109)
at com.vordel.apiportal.runtime.PortalBroker.processRequest(PortalBroker.java:57)
at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:438)
at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:135)
Caused by: java.lang.NullPointerException
at com.vordel.log.LogUtility.getRequestLine(LogUtility.java:22)
at com.vordel.log.LogMessagePayload.getMessageContents(LogMessagePayload.java:27)
at com.vordel.log.LogMessagePayload.getPayload(LogMessagePayload.java:40)
at com.vordel.log.DefaultLogPayloadFormatter.formatLog(DefaultLogPayloadFormatter.java:27)
at com.vordel.log.rolloverfile.TextRollOverLogger.logMessagePayload(TextRollOverLogger.java:93)
... 25 more
Resolution
use for FORMAT the: -<<X ${timestamp} ${id} ${filterName} ${payload} >>for the "Log Message Payload" in the second (the one that is called with the shortcut) policy