A NPE occurs on GetMap requests on cascaded WMS after running GS for a certain time (sometimes hours, sometimes days).
Once the exception occured for a certain layer the exception persists and every GetMap request causes the NPE. This makes this error quite severe.
We have the same problem with totally different installations (customers).
Unfortunately there is no known way to reproduce the problem, it occurs randomly. I suspect concurrent modifications on GS internal datastructures (catalog) to be the cause.
As far as I know the capabilities of the remote WMS are cached for a certain time. Maybe on concurrent refreshes this problem occurs. But this is only a guess.
Workaround: Reload the configuration through the admin UI or disable/enable the datastore.
The same problem was already discussed here, but without result:
Maybe (probably?) is another symptom for the same issue.
Any hints on how to track down the problem are welcome.
This is the corresponding code: