Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1067

Thread safety issue in BeansClosure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.6.Final, 2.0.0.Alpha2
    • 1.1.4.Final
    • None
    • None
    • Hide

      See linked issue.

      Show
      See linked issue.

      The getClosure() method does not synchronize on get. This leads to multiple Weld deployments on AS7 calling the get method, all at once and leads to the following error:

      java.lang.NullPointerException
      at org.jboss.weld.manager.BeanManagerImpl.getMostSpecializedBean(BeanManagerImpl.java:931)
      at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:605)
      at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:228)
      at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
      at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
      at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
      at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:46)
      at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:322)
      at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:80)
      at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

              ajustin@redhat.com Ales Justin
              mageshbk_jira Magesh Bojan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: