KB Article #180515
java.lang.NullPointerException thrown when enviromentalize a Throttling Filter
Problem
This happens while trying to configure the Throttling filter for a simple html page.
In particular, it is trying to environmentalize the maximum number of messages allowed (Floating Time Window algorithm).
The deployment was ok.
However, once it is invoked the policy a NullPointerException is triggered. The exception stack trace:
ERROR 12/07/19 10:06:18.383 Could not find authentication-subject-id in HTTP headers or the querystring
ERROR 12/07/19 10:06:18.396 The message [Id-7a3f285dced2d58375d2e949] logged Failure at 07.12.2019 10:06:18,383 with log description: Failed to extract attribute HTTP header
ERROR 12/07/19 10:06:18.397 java exception:
java.lang.NullPointerException
at com.vordel.circuit.throttling.MaximumNumberMsgsProcessor.invoke(MaximumNumberMsgsProcessor.java:339)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:148)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:40)
at com.vordel.circuit.CircuitDelegateProcessor.invoke(CircuitDelegateProcessor.java:46)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:148)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:40)
at com.vordel.circuit.InvocationEngine.recordCircuitInvocation(InvocationEngine.java:275)
at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.java:237)
at com.vordel.circuit.SyntheticCircuitChainProcessor.invoke(SyntheticCircuitChainProcessor.java:65)
at com.vordel.dwe.http.HTTPPlugin.processRequest(HTTPPlugin.java:420)
at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:439)
at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:142)
ERROR 12/07/19 10:06:18.398 The message [Id-7a3f285dced2d58375d2e949] logged Failure at 07.12.2019 10:06:18,397 with log description: Maximum number of messages filter was triggered
ERROR 12/07/19 10:06:18.399 The message [Id-7a3f285dced2d58375d2e949] logged Failure at 07.12.2019 10:06:18,398 with log description: Failed in calling policy shortcut
ERROR 12/07/19 10:06:18.400 Filter that caused failure: Throttling
Policy 'Policy' {
Filter 'Retrieve authentication.subject.id from http header' Status: FAILED
Filter 'Trace Filter' Status: PASSED
}
Policy 'sca' {
Filter 'Start Proxy' Status: PASSED
Filter 'Check Security ' Status: FAILED
Policy 'Security ' {
Filter 'Throttling' Status: ABORTED
}
}
Throttling filter failed
Resolution
The throttling/Allow environmentalized value was found empty.
Setting a value the error is solved.