[JBoss JIRA] (SOLDER-339) Catch attempts to use BeanManager during application initialization under Weld 2.0
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/SOLDER-339?page=com.atlassian.jira.plugin... ]
Martin Kouba edited comment on SOLDER-339 at 1/23/14 4:13 AM:
--------------------------------------------------------------
Weld 2 non-portable mode only solves the issue with invoking some specific methods (e.g. getBeans()) on BeanManager during application initialization (which is forbidden in CDI 1.1).
was (Author: mkouba):
Well, non-portable mode only solves the issue with invoking some specific methods (e.g. getBeans()) on BeanManager during application initialization (which is forbidden in CDI 1.1).
> Catch attempts to use BeanManager during application initialization under Weld 2.0
> ----------------------------------------------------------------------------------
>
> Key: SOLDER-339
> URL: https://issues.jboss.org/browse/SOLDER-339
> Project: Solder
> Issue Type: Bug
> Affects Versions: 3.1.0.Final
> Environment: JBoss 7.1.1 w/ Weld 2.0.0.Beta2
> Reporter: Ken H
>
> The exception prevents application from starting.
> org.jboss.weld.exceptions.IllegalStateException: WELD-001332 BeanManager method getBeans() is not available during application initialization
> at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerInitialized(BeanManagerProxy.java:148)
> at org.jboss.weld.bean.builtin.BeanManagerProxy.getBeans(BeanManagerProxy.java:78)
> at org.jboss.solder.exception.control.HandlerMethodImpl.getBean(HandlerMethodImpl.java:154)
> at org.jboss.solder.exception.control.HandlerMethodImpl.<init>(HandlerMethodImpl.java:138)
> at org.jboss.solder.exception.control.extension.CatchExtension.findHandlers(CatchExtension.java:102)
> at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:268)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:264)
> at org.jboss.weld.annotated.runtime.InvokableAnnotatedMethod.invokeOnInstance(InvokableAnnotatedMethod.java:82)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:97)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:276)
> at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:134)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:263)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:238)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:242)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:173)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:47)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:134)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:109)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:69)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:30)
> at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:154)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:145)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:133)
> at org.jboss.weld.bootstrap.BeanDeployer.deploy(BeanDeployer.java:309)
> at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:265)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:446)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:92)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:77)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (SOLDER-339) Catch attempts to use BeanManager during application initialization under Weld 2.0
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/SOLDER-339?page=com.atlassian.jira.plugin... ]
Martin Kouba commented on SOLDER-339:
-------------------------------------
Well, non-portable mode only solves the issue with invoking some specific methods (e.g. getBeans()) on BeanManager during application initialization (which is forbidden in CDI 1.1).
> Catch attempts to use BeanManager during application initialization under Weld 2.0
> ----------------------------------------------------------------------------------
>
> Key: SOLDER-339
> URL: https://issues.jboss.org/browse/SOLDER-339
> Project: Solder
> Issue Type: Bug
> Affects Versions: 3.1.0.Final
> Environment: JBoss 7.1.1 w/ Weld 2.0.0.Beta2
> Reporter: Ken H
>
> The exception prevents application from starting.
> org.jboss.weld.exceptions.IllegalStateException: WELD-001332 BeanManager method getBeans() is not available during application initialization
> at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerInitialized(BeanManagerProxy.java:148)
> at org.jboss.weld.bean.builtin.BeanManagerProxy.getBeans(BeanManagerProxy.java:78)
> at org.jboss.solder.exception.control.HandlerMethodImpl.getBean(HandlerMethodImpl.java:154)
> at org.jboss.solder.exception.control.HandlerMethodImpl.<init>(HandlerMethodImpl.java:138)
> at org.jboss.solder.exception.control.extension.CatchExtension.findHandlers(CatchExtension.java:102)
> at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:268)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:264)
> at org.jboss.weld.annotated.runtime.InvokableAnnotatedMethod.invokeOnInstance(InvokableAnnotatedMethod.java:82)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:97)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:276)
> at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:134)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:263)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:238)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:242)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:173)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:47)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:134)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:109)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:69)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:30)
> at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:154)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:145)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:133)
> at org.jboss.weld.bootstrap.BeanDeployer.deploy(BeanDeployer.java:309)
> at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:265)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:446)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:92)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:77)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (SOLDER-339) Catch attempts to use BeanManager during application initialization under Weld 2.0
by yangju (JIRA)
[ https://issues.jboss.org/browse/SOLDER-339?page=com.atlassian.jira.plugin... ]
yangju commented on SOLDER-339:
-------------------------------
org.jboss.weld.nonPortableMode=true does not seem to work in Wildfly CR1 with Solder 3.2.0.Final and Solder 3.1.0.Final. Even I set this flag as system property in standalone.conf.bat (windows), the deployment still throws errors:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type HttpServletRequest with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private org.jboss.solder.servlet.http.CookieParamProducer.request
at org.jboss.solder.servlet.http.CookieParamProducer.request(CookieParamProducer.java:0)
Possible dependencies:
- WELD|AbstractSyntheticBean|epen-login-1.4.30-SNAPSHOT.war/WEB-INF/lib/solder-impl-3.2.0.Final.jar|HttpServletRequest,
- Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces @Typed @RequestScoped protected org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()]
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:369)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:282)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:133)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:507)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Is there any other work around?
Thanks.
> Catch attempts to use BeanManager during application initialization under Weld 2.0
> ----------------------------------------------------------------------------------
>
> Key: SOLDER-339
> URL: https://issues.jboss.org/browse/SOLDER-339
> Project: Solder
> Issue Type: Bug
> Affects Versions: 3.1.0.Final
> Environment: JBoss 7.1.1 w/ Weld 2.0.0.Beta2
> Reporter: Ken H
>
> The exception prevents application from starting.
> org.jboss.weld.exceptions.IllegalStateException: WELD-001332 BeanManager method getBeans() is not available during application initialization
> at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerInitialized(BeanManagerProxy.java:148)
> at org.jboss.weld.bean.builtin.BeanManagerProxy.getBeans(BeanManagerProxy.java:78)
> at org.jboss.solder.exception.control.HandlerMethodImpl.getBean(HandlerMethodImpl.java:154)
> at org.jboss.solder.exception.control.HandlerMethodImpl.<init>(HandlerMethodImpl.java:138)
> at org.jboss.solder.exception.control.extension.CatchExtension.findHandlers(CatchExtension.java:102)
> at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:268)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:264)
> at org.jboss.weld.annotated.runtime.InvokableAnnotatedMethod.invokeOnInstance(InvokableAnnotatedMethod.java:82)
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:97)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:276)
> at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:134)
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:263)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:238)
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:242)
> at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:173)
> at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:47)
> at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:134)
> at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:109)
> at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:69)
> at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
> at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:30)
> at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:154)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:145)
> at org.jboss.weld.bootstrap.AbstractBeanDeployer.fireBeanEvents(AbstractBeanDeployer.java:133)
> at org.jboss.weld.bootstrap.BeanDeployer.deploy(BeanDeployer.java:309)
> at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:265)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:446)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:92)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:77)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months