Hi,
I just hit the NPE on ContentServices problem again so I've reopen the
bug. The good news is now I know why it happens. Here's the issue.
All PC subsystems are initialized in
org.rhq.core.pc.PluginContainer#initialize
InventoryManager is initialized *before* the ContentManager
When InventoryManager is initialized, it activates already inventoried
resources recursively. Inventoried resources which have child types
creatable by content are given a
org.rhq.core.pluginapi.content.ContentContext instance. The problem is
the ContentContext holds a null reference to ContentManager, because at
this point the Content manager is not initialized, and not even created.
The consequences are the following:
* resources added to inventory *after* the PC started will be able to
use the content services, because when their resource context is
created, the content manager is already initialized
* resources *already* in inventory when the PC is started will not be
able to use the content services.
I'm working on a fix for 4.13.
Regards,
Thomas