[
https://jira.jboss.org/browse/JBAS-8249?page=com.atlassian.jira.plugin.sy...
]
Marius Bogoevici commented on JBAS-8249:
----------------------------------------
The actual error being thrown with Weld 1.1 is below[1]:
As explained before, the main problem is that the classloader for a couple of extensions
is the respective classloader of the deployer that loaded it. As explained previously,
adding these extensions directly to the Deployment Unit's CL resolves the problem.
[1]
12:45:57,716 INFO [org.jboss.profileservice.management.upload.remoting.DeployHandler]
invoke, payload:
{DeploymentTargetID=names=[org.jboss.weld.tests.producer.method.ManagerProducerTest.war],
clientAddress=/127.0.0.1}, parameter: remove
12:45:57,717 WARN [org.jboss.profileservice.management.upload.remoting.DeployHandler]
Failed to complete command: [remove] for deployment:
names=[org.jboss.weld.tests.producer.method.ManagerProducerTest.war]:
org.jboss.profileservice.spi.NoSuchDeploymentException:
org.jboss.weld.tests.producer.method.ManagerProducerTest.war
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.resolveProfileForDeployment(AbstractDeployHandler.java:291)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.resolveProfiles(AbstractDeployHandler.java:248)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.removeDeployments(AbstractDeployHandler.java:201)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.removeDeployments(DeployHandlerDelegate.java:84)
[:6.0.0-SNAPSHOT]
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156)
[:6.0.0-SNAPSHOT]
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:]
at
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
[:]
at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
[:]
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
[:]
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
[:]
12:46:16,443 INFO [org.jboss.profileservice.management.upload.remoting.DeployHandler]
invoke, payload:
{DeploymentTargetID=names=[org.jboss.weld.tests.producer.method.ManagerProducerTest.war],
clientAddress=/127.0.0.1}, parameter: start
12:46:19,071 INFO [org.jboss.weld.Version] WELD-000900 1.1.0 (SNAPSHOT)
Listening for transport dt_socket at address: 5005
12:46:45,002 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error
installing to Start:
name=vfs:///opt/jboss/jboss-6.0.0-SNAPSHOT/server/default/deploy/org.jboss.weld.tests.producer.method.ManagerProducerTest.war_WeldBootstrapBean
state=Create: org.jboss.weld.exceptions.DefinitionException: Exception List with 1
exceptions:
Exception 0 :
com.google.common.collect.ComputationException: org.jboss.weld.exceptions.WeldException:
org.jboss.weld.bean.proxy.BeanInstance
at com.google.common.collect.MapMaker$StrategyImpl.compute(MapMaker.java:602)
at com.google.common.collect.MapMaker$StrategyImpl.compute(MapMaker.java:462)
at
com.google.common.collect.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2045)
at
org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:104)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:650)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:234)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:216)
at
org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:604)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:597)
at
org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:67)
at
org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:42)
at
org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:44)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:65)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:92)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:108)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:392)
at
org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:121)
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:597)
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
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:379)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
at
org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
at
org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
at
org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130)
at
org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:98)
at
org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:100)
at
org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)
at
org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)
at
org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)
at
org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)
at
org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:148)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)
at
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
Caused by: org.jboss.weld.exceptions.WeldException:
org.jboss.weld.bean.proxy.BeanInstance
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:212)
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:159)
at
org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:89)
at
org.jboss.weld.bean.proxy.ClientProxyProvider.access$000(ClientProxyProvider.java:40)
at
org.jboss.weld.bean.proxy.ClientProxyProvider$1.apply(ClientProxyProvider.java:53)
at
org.jboss.weld.bean.proxy.ClientProxyProvider$1.apply(ClientProxyProvider.java:44)
at com.google.common.collect.MapMaker$StrategyImpl.compute(MapMaker.java:592)
... 60 more
Caused by: org.jboss.weld.exceptions.WeldException:
org.jboss.weld.bean.proxy.BeanInstance
at org.jboss.weld.bean.proxy.ProxyFactory.addFields(ProxyFactory.java:356)
at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:299)
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:208)
... 66 more
Caused by: javassist.NotFoundException: org.jboss.weld.bean.proxy.BeanInstance
at javassist.ClassPool.get(ClassPool.java:436)
at org.jboss.weld.bean.proxy.ProxyFactory.addFields(ProxyFactory.java:350)
... 68 more
at
org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:45)
at
org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:44)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:65)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:92)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:108)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:392)
at
org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:121)
[:6.0.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[:1.6.0_20]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
[jboss-reflect.jar:2.2.0.Alpha9]
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
[jboss-reflect.jar:2.2.0.Alpha9]
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
[jboss-reflect.jar:2.2.0.Alpha9]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
[jboss-kernel.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
[jboss-dependency.jar:2.2.0.Alpha10]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
[:2.2.0.Alpha6]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
[:2.2.0.Alpha6]
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
[:2.2.0.Alpha6]
at
org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
[:6.0.0-SNAPSHOT]
at
org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:98)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:100)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)
[:0.1.0.Alpha1]
at
org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)
[:6.0.0-SNAPSHOT]
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:148)
[:6.0.0-SNAPSHOT]
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:]
at
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
[:]
at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
[:]
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
[:]
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
[:]
CDI Extensions must be added to DU's classloader through an
integration deployer
---------------------------------------------------------------------------------
Key: JBAS-8249
URL:
https://jira.jboss.org/browse/JBAS-8249
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Weld/CDI
Affects Versions: 6.0.0.M4
Reporter: Marius Bogoevici
Assignee: Marius Bogoevici
Fix For: 6.0.0.Final
CDI integration features of the various JBoss components may use portable extensions for
interacting with the CDI container.
Wherever that is the case, make sure that the jars containing the extensions are added to
deployment unit's classloader and not to the deployer's classloader (the default),
as they should effectively become parts of the application that is being deployed.
Also, splitting the application classes between deployers and deployment unit doesn't
work with Weld 1.1's proxification mechanism.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira