[Design of POJO Server] - Classloader problem with NamingRestartUnitTestCase
by bstansberry@jboss.com
Looking at why the o.j.t.naming.test.NamingRestartUnitTestCase started failing, looks like there is some classloader problem when a sar is redeployed.
This test deploys a sar with a -beans.xml and a couple classes. It then redeploys it to simulate a restart of the naming service. This redeploy is failing:
| 2008-02-01 10:09:41,700 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=RestartNamingService state=PreInstall
| java.lang.RuntimeException: java.lang.IllegalStateException: BaseClassLoader@1345af1{vfsfile:/home/bes/dev/jboss/trunk/testsuite/output/lib/naming-restart.sar} classLoader is not connected to a domain (probably undeployed?) for class org.jboss.aspects.jmx.MBean
| at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:137)
| at org.jboss.aop.pointcut.TypeMatcher.visit(TypeMatcher.java:153)
| at org.jboss.aop.pointcut.ast.ASTClass.jjtAccept(ASTClass.java:43)
| at org.jboss.aop.pointcut.TypeMatcher.visit(TypeMatcher.java:73)
| at org.jboss.aop.pointcut.ast.ASTStart.jjtAccept(ASTStart.java:42)
| at org.jboss.aop.introduction.InterfaceIntroduction.matches(InterfaceIntroduction.java:274)
| at org.jboss.aop.AspectManager.applyInterfaceIntroductions(AspectManager.java:1735)
| at org.jboss.aop.Advisor.initializeInterfaceIntroductions(Advisor.java:318)
| at org.jboss.aop.proxy.container.ClassProxyContainer.initialise(ClassProxyContainer.java:171)
| at org.jboss.aop.proxy.container.InstanceProxyContainer.<init>(InstanceProxyContainer.java:56)
| at org.jboss.aop.proxy.container.InstanceProxyContainer.createInstanceProxyContainer(InstanceProxyContainer.java:68)
| at org.jboss.aop.proxy.container.ContainerCache.initInstanceContainer(ContainerCache.java:277)
| at org.jboss.aop.proxy.container.ContainerCache.initialise(ContainerCache.java:93)
| at org.jboss.aop.proxy.container.ContainerCache.initialise(ContainerCache.java:72)
| at org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getDependencies(AOPDependencyBuilder.java:97)
| at org.jboss.classadapter.plugins.BasicClassAdapter.getDependencies(BasicClassAdapter.java:80)
| at org.jboss.beans.info.plugins.AbstractBeanInfo.getDependencies(AbstractBeanInfo.java:211)
| at org.jboss.kernel.plugins.dependency.DescribeAction.installActionInternal(DescribeAction.java:53)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:69)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:42)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:812)
| at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:587)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:270)
| at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
| at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
| at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:815)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:416)
| at sun.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalStateException: BaseClassLoader@1345af1{vfsfile:/home/bes/dev/jboss/trunk/testsuite/output/lib/naming-restart.sar} classLoader is not connected to a domain (probably undeployed?) for class org.jboss.aspects.jmx.MBean
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:579)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:234)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.aop.Advisor.hasAnnotation(Advisor.java:396)
| at org.jboss.aop.Advisor.hasAnnotation(Advisor.java:370)
| at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:115)
| ... 94 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125600#4125600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125600
16 years, 11 months
[Design of JBoss/Tomcat Integration] - Re: Tomcat Deployer is wrong in JBoss Head
by adrian@jboss.org
anonymous wrote : What's much harder to me is how to handle TomcatDeployment, which has lots of dependencies and extends AbstractWarDeployment.
My understanding is that AbstractWar/TomcatDeployment are encapuslated
by the WebModule MBean that is used to "populate" the runtime.
It is the WebModule that is created as the ServiceMetaData
description by the deployers and it delegates to the Deployment which in
turn "talks to" the runtime in the start/stop
once dependencies are resolved (e.g. the clustering implementation or ejb-links resolved)
This could probably be simplified (a lot :-) At least since WebModule
seems to be doing little except possibly avoiding a change in api
at some previous point in history?
The link to AbstractWarDeployer (described as "container")
in the WebModule should probably be changed to be the runtime service?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125582#4125582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125582
16 years, 11 months