When one tries to open Personal Eventing menu of a user for the first try, exception is shown. But it goes away after that.
Reproducable with new user with something stored in PEP.
a) The NPE is caused by the PEPServiceManager.java:162, in method PEPServiceManager#loadPEPServiceFromDB(String)
b) pubSubEngine is initialised in the PEPServiceManager#start() method, cleared in the PEPServiceManager#stop() method.
c) There are a number of places a PEPServiceManager is created (all ultimately JSP pages, some via PEPServiceInfo) without the start() method being called - any of these can cause the NPE if it's necessary to call PEPServiceManager#loadPEPServiceFromDB(String) because the entry in question is not in the cache, and an attempt (that fails) is made to fetch it from the pubSubEngine.
d) I'm also concerned that multiple instances of PubSubEngine are created (well, two - one in the PubSubModule, one in the IQPEPHandler - possibly more if we start creating one to fix this bug). It may not be an issue having multiple instances -but something to consider.
I'm not sure of the best way forward on this right now.