-
1. Re: RemoteMBeanServer.createMBean() returns null - but no ex
juha Jul 12, 2002 4:21 AM (in response to ctoomey)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;
return null;
}
(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?
-- Juha -
2. Re: RemoteMBeanServer.createMBean() returns null - but no ex
adrian.brock Jul 12, 2002 12:50 PM (in response to ctoomey)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
RuntimeOperationsException would
give more information in finding this problem.
Regards,
Adrian