Kabir Khan wrote:
If you've seen the dev-list discussions yesterday regarding JBAS-6489, I can work
around this in AOP, but I have found the cause to be something to do with
org.jboss.test.webservice.endpoint.EndpointTestCase. It deploys
jaxws-endpoint-servlet.war.
Hot-deploying the war seems to go through the deployer chain twice. Once, when it goes
through usual hot-deployment (See Stack1 below), then it does something in the
tomcat/service-layer, I guess to deploy the WS endpoint (See Stack2 below).
Now the problem is that the first time it deploys this, it correctly includes a Module
attachment with the deploymentunit which links the classloader to a scoped classloading
domain called
"vfszip:/Users/kabir/sourcecontrol/jbossas/Branch_5_0/testsuite/output/lib/jaxws-endpoint-servlet.war"
(See variables1 below). When it deploys the second time, it incorrectly includes a Module
attachment with the deploymentunit linking the classloader to the main/non-scoped
classloading domain called DefaultDomain. Somehow the new deployment created internally
needs to either include the original Module, or the correct classloading metadata to reuse
the name
"vfszip:/Users/kabir/sourcecontrol/jbossas/Branch_5_0/testsuite/output/lib/jaxws-endpoint-servlet.war".
I think this happens around this point of Stack2:
DynamicEndpointDeploymentAspect.create(Deployment) line: 88
DeploymentAspectManagerImpl.deploy(Deployment) line: 115
DeploymentAspectHttpServer.publish(HttpContext, Endpoint) line: 91
Since deployment 2 also passes through the AOPClassLoader deployer and it is getting the
wrong information, AOP gets confused about the AOP domains used.
Stack1:
Daemon System Thread [RMI TCP Connection(10)-127.0.0.1] (Suspended (breakpoint at line 58
in VFSClassLoaderDomainRegistry))
VFSClassLoaderDomainRegistry.initMapsForLoader(ClassLoader, Module,
ScopedVFSClassLoaderDomain, ClassLoader) line: 58
AOPClassLoaderInitializer.registerLoaders(AOPClassLoaderScopingPolicyWithRegistry,
DeploymentUnit) line: 78
AOPClassLoaderInitializer.initializeForUnit(DeploymentUnit) line: 41
AOPClassLoaderDeployer.internalDeploy(DeploymentUnit) line: 65
AOPClassLoaderDeployer(AbstractRealDeployer).deploy(DeploymentUnit) line: 50
DeployerWrapper.deploy(DeploymentUnit) line: 171
DeployersImpl.doDeploy(Deployer, DeploymentUnit) line: 1439
DeployersImpl.doInstallParentFirst(Deployer, DeploymentContext) line: 1157
DeployersImpl.install(ControllerContext, ControllerState, ControllerState) line: 1098
DeploymentControllerContext(AbstractControllerContext).install(ControllerState,
ControllerState) line: 348
AbstractKernelController(AbstractController).install(ControllerContext,
ControllerState, ControllerState) line: 1598
AbstractKernelController(AbstractController).incrementState(ControllerContext,
boolean) line: 934
AbstractKernelController(AbstractController).resolveContexts(ControllerState,
ControllerState, boolean) line: 1062
AbstractKernelController(AbstractController).resolveContexts(boolean) line: 984
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState, boolean) line: 822
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState) line: 553
DeployersImpl.process(List, List) line: 781
MainDeployerImpl.process() line: 572
MainDeployer.deploy(URL) line: 812
MainDeployer.redeploy(URL) line: 587
Stack2:
Daemon System Thread [RMI TCP Connection(10)-127.0.0.1] (Suspended (breakpoint at line 58
in VFSClassLoaderDomainRegistry))
VFSClassLoaderDomainRegistry.initMapsForLoader(ClassLoader, Module,
ScopedVFSClassLoaderDomain, ClassLoader) line: 58
AOPClassLoaderInitializer.registerLoaders(AOPClassLoaderScopingPolicyWithRegistry,
DeploymentUnit) line: 78
AOPClassLoaderInitializer.initializeForUnit(DeploymentUnit) line: 41
AOPClassLoaderDeployer.internalDeploy(DeploymentUnit) line: 65
AOPClassLoaderDeployer(AbstractRealDeployer).deploy(DeploymentUnit) line: 50
DeployerWrapper.deploy(DeploymentUnit) line: 171
DeployersImpl.doDeploy(Deployer, DeploymentUnit) line: 1439
DeployersImpl.doInstallParentFirst(Deployer, DeploymentContext) line: 1157
DeployersImpl.install(ControllerContext, ControllerState, ControllerState) line: 1098
DeploymentControllerContext(AbstractControllerContext).install(ControllerState,
ControllerState) line: 348
AbstractKernelController(AbstractController).install(ControllerContext,
ControllerState, ControllerState) line: 1598
AbstractKernelController(AbstractController).incrementState(ControllerContext,
boolean) line: 934
AbstractKernelController(AbstractController).resolveContexts(ControllerState,
ControllerState, boolean) line: 1062
AbstractKernelController(AbstractController).resolveContexts(boolean) line: 984
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState, boolean) line: 822
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState) line: 553
DeployersImpl.process(List, List) line: 781
MainDeployerImpl.deploy(Deployment...) line: 445
DynamicEndpointDeploymentAspect.create(Deployment) line: 88
DeploymentAspectManagerImpl.deploy(Deployment) line: 115
DeploymentAspectHttpServer.publish(HttpContext, Endpoint) line: 91
EndpointImpl.publish(Object) line: 172
EndpointServlet.init(ServletConfig) line: 70
StandardWrapper.loadServlet() line: 1048
StandardWrapper.load() line: 950
StandardContext.loadOnStartup(Container[]) line: 4122
StandardContext.start() line: 4421
TomcatDeployment.performDeployInternal(WebApplication, String, String) line: 315
TomcatDeployment.performDeploy(WebApplication, String) line: 147
TomcatDeployment(AbstractWarDeployment).start(DeploymentUnit, JBossWebMetaData) line:
461
WebModule.startModule() line: 118
WebModule.start() line: 97
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
ReflectedDispatcher.invoke(Invocation) line: 157
Invocation.dispatch() line: 96
Invocation.invoke() line: 88
XMBean(AbstractMBeanInvoker).invoke(String, Object[], String[]) line: 264
MBeanServerImpl.invoke(ObjectName, String, Object[], String[]) line: 668
ServiceProxy.invoke(Object, Method, Object[]) line: 206
$Proxy36.start() line: not available
StartStopLifecycleAction.installAction(ServiceControllerContext) line: 42
StartStopLifecycleAction.installAction(ControllerContext) line: 37
StartStopLifecycleAction(SimpleControllerContextAction).simpleInstallAction(T) line:
62
StartStopLifecycleAction(AccessControllerContextAction<S,T>).install(ControllerContext)
line: 71
ServiceControllerContextActions(AbstractControllerContextActions).install(ControllerContext,
ControllerState, ControllerState) line: 51
ServiceControllerContext(AbstractControllerContext).install(ControllerState,
ControllerState) line: 348
ServiceControllerContext.install(ControllerState, ControllerState) line: 286
AbstractKernelController(AbstractController).install(ControllerContext,
ControllerState, ControllerState) line: 1598
AbstractKernelController(AbstractController).incrementState(ControllerContext,
boolean) line: 934
AbstractKernelController(AbstractController).resolveContexts(ControllerState,
ControllerState, boolean) line: 1062
AbstractKernelController(AbstractController).resolveContexts(boolean) line: 984
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState, boolean) line: 822
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState) line: 553
ServiceController.doChange(KernelController, ServiceControllerContext,
ControllerState, String) line: 688
ServiceController.start(ObjectName) line: 460
ServiceDeployer.start(ServiceContext) line: 163
ServiceDeployer.deploy(DeploymentUnit, ServiceMetaData) line: 99
ServiceDeployer.deploy(DeploymentUnit, Object) line: 46
ServiceDeployer(AbstractSimpleRealDeployer).internalDeploy(DeploymentUnit) line: 62
ServiceDeployer(AbstractRealDeployer).deploy(DeploymentUnit) line: 50
DeployerWrapper.deploy(DeploymentUnit) line: 171
DeployersImpl.doDeploy(Deployer, DeploymentUnit) line: 1439
DeployersImpl.doInstallParentFirst(Deployer, DeploymentContext) line: 1157
DeployersImpl.doInstallParentFirst(Deployer, DeploymentContext) line: 1178
DeployersImpl.install(ControllerContext, ControllerState, ControllerState) line: 1098
DeploymentControllerContext(AbstractControllerContext).install(ControllerState,
ControllerState) line: 348
AbstractKernelController(AbstractController).install(ControllerContext,
ControllerState, ControllerState) line: 1598
AbstractKernelController(AbstractController).incrementState(ControllerContext,
boolean) line: 934
AbstractKernelController(AbstractController).resolveContexts(ControllerState,
ControllerState, boolean) line: 1062
AbstractKernelController(AbstractController).resolveContexts(boolean) line: 984
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState, boolean) line: 822
AbstractKernelController(AbstractController).change(ControllerContext,
ControllerState) line: 553
DeployersImpl.process(List, List) line: 781
MainDeployerImpl.process() line: 572
MainDeployer.deploy(URL) line: 812
MainDeployer.redeploy(URL) line: 587
Variables1:
loader BaseClassLoader (id=641)
module VFSDeploymentClassLoaderPolicyModule (id=676)
capabilities CopyOnWriteArrayList (id=677)
classLoader BaseClassLoader (id=641)
classLoadingMetaData ClassLoadingMetaData (id=678)
context DeploymentControllerContext (id=637)
contextName
"vfszip:/Users/kabir/sourcecontrol/jbossas/Branch_5_0/testsuite/output/lib/jaxws-endpoint-servlet.war"
(id=666)
domain Domain (id=361)
classLoading ClassLoading (id=701)
modules CopyOnWriteArrayList (id=703)
modulesByName ConcurrentHashMap<K,V> (id=704)
name
"vfszip:/Users/kabir/sourcecontrol/jbossas/Branch_5_0/testsuite/output/lib/jaxws-endpoint-servlet.war"
(id=261)
parentDomainName "DefaultDomain" (id=585)
parentFirst false
excludedRoots VirtualFile[0] (id=679)
name
"vfszip:/Users/kabir/sourcecontrol/jbossas/Branch_5_0/testsuite/output/lib/jaxws-endpoint-servlet.war"
(id=666)
policy VFSClassLoaderPolicy (id=680)
requirementDependencies null
requirements null
space null
system DefaultClassLoaderSystem (id=389)
unit AbstractVFSDeploymentUnit (id=638)
version Version (id=681)
vfsRoots VirtualFile[2] (id=683)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209486#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...