[JBoss JIRA] (WELD-1087) CLONE - Double-checked locking in org.jboss.weld.util.BeansClosure#getClosure is a cause for NPE
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WELD-1087?page=com.atlassian.jira.plugin.... ]
Stuart Douglas resolved WELD-1087.
----------------------------------
Resolution: Duplicate Issue
This is actually a duplicate of WELD-1067, which is fixed upstream
> CLONE - Double-checked locking in org.jboss.weld.util.BeansClosure#getClosure is a cause for NPE
> ------------------------------------------------------------------------------------------------
>
> Key: WELD-1087
> URL: https://issues.jboss.org/browse/WELD-1087
> Project: Weld
> Issue Type: Bug
> Affects Versions: 1.1.5.Final
> Environment: N/A
> Reporter: Anton Arhipov
> Assignee: Stuart Douglas
> Labels: cdi, jbossas_7.1, weld
>
> Application deployment fails with a following exception:
> 05:33:26,201 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."exp-cdi-injectApplication.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."exp-cdi-injectApplication.war".WeldService: java.lang.NullPointerException
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]
> Caused by: java.lang.NullPointerException
> at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:194)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
> at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
> at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
> ... 5 more
> Looking at the code that belongs to weld-core-1.1.5.AS71.Final, we can see the following at the lines 193-194 of BeanDeployment:
> 193: BeansClosure closure = BeansClosure.getClosure(this.beanManager);
> 194: closure.addEnvironment(this.beanDeployer.getEnvironment());
> Which leads to a conclusion that closure is null (the lines prior to the mentioned ones show that beanDeployer itself couldn't be null).
> Looking into BeansClosure#getClosure():
> public static BeansClosure getClosure(BeanManagerImpl beanManager)
> {
> BeansClosure closure = (BeansClosure)closureMap.get(beanManager);
> if (closure == null) {
> synchronized (closureMap) {
> if (!closureMap.containsKey(beanManager)) {
> closure = new BeansClosure();
> for (Iterable beanManagers : BeanManagers.getAccessibleClosure(beanManager)) {
> for (BeanManagerImpl accessibleBeanManager : beanManagers) {
> closureMap.put(accessibleBeanManager, closure);
> }
> }
> }
> }
> }
> return closure;
> }
> To prevent race conditions, maybe it makes sense to reside the full method body into synchronized block.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (WELD-1070) WeldPhaseListener destroys conversation too soon
by Bernard Labno (JIRA)
Bernard Labno created WELD-1070:
-----------------------------------
Summary: WeldPhaseListener destroys conversation too soon
Key: WELD-1070
URL: https://issues.jboss.org/browse/WELD-1070
Project: Weld
Issue Type: Bug
Components: Conversations
Affects Versions: 1.1.4.Final
Environment: gentoo, java 1.6, AS7.1.0.Beta1, Seam 3.1.0.Final
Reporter: Bernard Labno
In JSF app when exception is thrown during RenderResponse phase then firstly there is a call to afterPhase and later to exception handlers.
WeldPhaseListener.afterPhase is invoked before error handler (Seam Catch in my case). My error handler wants to promote conversation to long-running and do redirect to error page, but conversation context is not active anymore now.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (WELD-1075) Ambiguous dependencies when only one correct dependency exists
by Sebastian Graca (JIRA)
Sebastian Graca created WELD-1075:
-------------------------------------
Summary: Ambiguous dependencies when only one correct dependency exists
Key: WELD-1075
URL: https://issues.jboss.org/browse/WELD-1075
Project: Weld
Issue Type: Bug
Components: Resolution (Typesafe and by Name)
Affects Versions: 1.1.4.Final, 1.1.1.Final
Reporter: Sebastian Graca
Attachments: testcase.zip
Running attached application gives the error:
WELD-001409 Ambiguous dependencies for type [Interface1<UUID, String>] with qualifiers [@Default] at injection point [[field] @Inject private test.Bean.dependency]. Possible dependencies [[Managed Bean [class test.ConcreteClass1] with qualifiers [@Any @Default], Managed Bean [class test.ConcreteClass2] with qualifiers [@Any @Default], Managed Bean [class test.ConcreteClass3] with qualifiers [@Any @Default]]]
But only ConcreteClass3 has required type of Interface1<UUID, String>
When ConcreteClass1 and ConcreteClass2 extens AbstractClass1 instead of AbstractClass2 everything works as expected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (WELD-731) Bind BeanManager to JNDI when naming context is read/write (as in JBoss AS/EAP 5)
by Dan Allen (JIRA)
Bind BeanManager to JNDI when naming context is read/write (as in JBoss AS/EAP 5)
---------------------------------------------------------------------------------
Key: WELD-731
URL: https://jira.jboss.org/browse/WELD-731
Project: Weld
Issue Type: Feature Request
Components: Servlet Container Support
Affects Versions: 1.1.0.Beta1
Reporter: Dan Allen
Fix For: 1.1.0.CR1
It's possible for the Weld servlet listener to be proactive and bind the BeanManager to JNDI when the naming context is read/write, as it is in JBoss AS and EAP 5. There's another good reason why this needs to be done. JBoss AS does not support defining naming resources in context.xml (which on JBoss AS is WEB-INF/context.xml). Therefore, there's no other way to push the BeanManager into JNDI.
The logic for this feature is pretty straightforward. Look for the BeanManager in JNDI. If it's not there, attempt to put it there. If that fails, just log a warning message that the BeanManager will not be available in JNDI.
--
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
12 years, 1 month