tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
Subject [4.1] Custom components causing NPEs when creating MBeans
Date Mon, 21 Jan 2002 21:28:05 GMT
Hi,

The current code in MBeanUtils doesn't allow to have custom components, and
causes a NPE, such as:
ServerLifecycleListener: createMBeans: Throwable
java.lang.NullPointerException
        at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:346)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:284)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
cycleListener.java:169)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:628)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:497)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:397)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:200)

Even if no MBean is generated, this shouldn't do that.
We could add some code like this
if (managed == null) {
  // maybe log something
  return;
}
to make this more robust.

Remy


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message