dev@glassfish.java.net

Re: [v3] MBean server-related errors during web app deployment

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 08 Feb 2008 10:36:21 -0800

Tim,

Looks like someone inserted (or kept in place):
-Djavax.management.builder.initial
=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder

...a flag that causes JMX to try to load a custom factory for
creating the MBeanServer (as we do in V2).
AppServerMBeanServerBuilder should *not* be used in V3 (it either
doesn't exit or it can't be loaded due to the classloader setup with
modules.

Grepping the source for V3, I see the following (below). I don't
understand how DomainTest.xml comes into play with the domain (heck,
I don't even understand where domain.xml lives now). But we need to
eliminate that JVM option--permanently. Please remove that <jvm-
option> and things should work.

Do we have the source for Registry? It would be good to force it to
go through our "official" way to get the MBeanServer.

./admin/config-api/src/test/resources/.svn/text-base/
DomainTest.xml.svn-base: <jvm-options>-
Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.j
mx.AppServerMBeanServerBuilder</jvm-options>
./admin/config-api/src/test/resources/DomainTest.xml: <jvm-options>-
Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.j
mx.AppServerMBeanServerBuilder</jvm-options>
./admin/config-api/target/test-classes/DomainTest.xml: <jvm-
options>-
Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.j
mx.AppServerMBeanServerBuilder</jvm-options>


Lloyd

On Feb 7, 2008, at 9:38 PM, Tim Quinn wrote:

> When I deploy a simple web app I now get numerous repetitions of
> the errors below. I was not getting them before fairly late
> today. I did update my workspace recently.
>
> Anyone recognize these?
>
> - Tim
>
> Feb 7, 2008 11:36:02 PM org.apache.coyote.tomcat5.MapperListener init
> WARNING: Error registering contexts
> javax.management.JMRuntimeException: Failed to load
> MBeanServerBuilder class
> com.sun.enterprise.admin.server.core.jmx.AppServerMBean
> ServerBuilder: java.lang.ClassNotFoundException:
> com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
> at
> javax.management.MBeanServerFactory.checkMBeanServerBuilder
> (MBeanServerFactory.java:480)
> at
> javax.management.MBeanServerFactory.getNewMBeanServerBuilder
> (MBeanServerFactory.java:511)
> at javax.management.MBeanServerFactory.newMBeanServer
> (MBeanServerFactory.java:298)
> at javax.management.MBeanServerFactory.createMBeanServer
> (MBeanServerFactory.java:213)
> at javax.management.MBeanServerFactory.createMBeanServer
> (MBeanServerFactory.java:174)
> at com.sun.org.apache.commons.modeler.Registry.getMBeanServer
> (Registry.java:665)
> at com.sun.org.apache.commons.modeler.Registry.getServer
> (Registry.java:539)
> at org.apache.coyote.tomcat5.MapperListener.init
> (MapperListener.java:190)
> at com.sun.enterprise.web.WebConnector.start
> (WebConnector.java:48)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:
> 930)
> at com.sun.enterprise.web.WebContainer.postConstruct
> (WebContainer.java:270)
> at com.sun.hk2.component.AbstractWombImpl.inject
> (AbstractWombImpl.java:114)
> at com.sun.hk2.component.ConstructorWomb.initialize
> (ConstructorWomb.java:50)
> at com.sun.hk2.component.AbstractWombImpl.get
> (AbstractWombImpl.java:39)
> at com.sun.hk2.component.SingletonInhabitant.get
> (SingletonInhabitant.java:22)
> at com.sun.hk2.component.LazyInhabitant.get
> (LazyInhabitant.java:71)
> at com.sun.hk2.component.AbstractInhabitantImpl.get
> (AbstractInhabitantImpl.java:19)
> at
> com.sun.enterprise.v3.server.ContainerStarter.startContainer
> (ContainerStarter.java:125)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.startContainer
> (ApplicationLifecycle.java:389)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.load
> (ApplicationLifecycle.java:211)
> at com.sun.enterprise.v3.deployment.DeployCommand.execute
> (DeployCommand.java:215)
> at com.sun.enterprise.v3.admin.CommandRunner.doCommand
> (CommandRunner.java:171)
> at org.glassfish.deployment.autodeploy.AutoOperation.run
> (AutoOperation.java:118)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deploy
> (AutoDeployer.java:513)
> at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll
> (AutoDeployer.java:397)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run
> (AutoDeployer.java:333)
> at org.glassfish.deployment.autodeploy.AutoDeployer.run
> (AutoDeployer.java:327)
> at org.glassfish.deployment.autodeploy.AutoDeployService
> $1.run(AutoDeployService.java:110)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: java.lang.ClassNotFoundException:
> com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at
> com.sun.enterprise.module.impl.ClassLoaderProxy.findClassDirect
> (ClassLoaderProxy.java:90)
> at com.sun.enterprise.module.impl.ClassLoaderProxy.findClass
> (ClassLoaderProxy.java:81)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at com.sun.enterprise.module.impl.ModuleClassLoader.loadClass
> (ModuleClassLoader.java:67)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at javax.management.MBeanServerFactory.loadBuilderClass
> (MBeanServerFactory.java:423)
> at
> javax.management.MBeanServerFactory.checkMBeanServerBuilder
> (MBeanServerFactory.java:465)
> ... 29 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc