This could be a bug somewhere in the code.
I don't have to time to go and search for it in detail right now, however a quick glance at the BasicMBeanRegistry.java (org.jboss.mx.server.registry package) reveals that a null is returned in a case where an unexpected error is encountered by the registry (lines below, don't have the exact line numbers as the version I'm looking at has been modified quite a bit):
catch (Throwable t)
// Some other error
registrationDone = false;
(sorry for the formatting, forums are still not quite working right).
You could try to edit this and see if this is where you're getting your null from. At least we should have a log.warn() or log.error() here. I think we probably should also throw a RuntimeOperationsException here rather than null.
Adrian any comments?
I agree with your analysis. Providing it is not the
connector/adaptor returning null.
In principle, that code should be unreachable.
Although it could happen if preRegister throws an Error.
But in that case you'll get a warning logged.
Logging the original throwable and throwing a
give more information in finding this problem.