OpenWebBeans
  1. OpenWebBeans
  2. OWB-628

Event injection doesn't work in observer methods.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.1.4
    • Component/s: Injection and Lookup
    • Labels:
      None

      Description

      I've tried this :
      public void onEvent(@Observes MyEvent event, Event<TotoEvent> eventSrc, ..)

      ... eventSrc is always null

        Activity

        Hide
        Miguel ZP added a comment -

        I've experienced the same behavior when trying to use SEAM Catch with TomEE (uses OWB for CDI). It contains the following observer method:

        ###

        public class ExceptionHandlerDispatch {

        ...

        public void executeHandlers(@Observes @Any ExceptionToCatch eventException, final BeanManager bm,
        CatchExtension extension, Event<ExceptionStack> stackEvent) throws Throwable {

        ...

        ###

        stackEvent is always null and therefore causes a NPE. It seems to be a problem at the injection of the parametrized type Event. Any clue?

        Show
        Miguel ZP added a comment - I've experienced the same behavior when trying to use SEAM Catch with TomEE (uses OWB for CDI). It contains the following observer method: ### public class ExceptionHandlerDispatch { ... public void executeHandlers(@Observes @Any ExceptionToCatch eventException, final BeanManager bm, CatchExtension extension, Event<ExceptionStack> stackEvent) throws Throwable { ... ### stackEvent is always null and therefore causes a NPE. It seems to be a problem at the injection of the parametrized type Event. Any clue?
        Hide
        Rohit Dilip Kelapure added a comment -

        Team please review the code changes. This should fix the issue.

        Show
        Rohit Dilip Kelapure added a comment - Team please review the code changes. This should fix the issue.
        Hide
        Miguel ZP added a comment -

        No way to include this in 1.1.4?

        Show
        Miguel ZP added a comment - No way to include this in 1.1.4?
        Hide
        Mark Struberg added a comment -

        Hi! I gonna look at this tonight.

        Show
        Mark Struberg added a comment - Hi! I gonna look at this tonight.
        Hide
        Kris Vandebroek added a comment -

        Hi I'm experiencing the same problem with Seam Catch. In fact, since Seam 3.1.0, Seam Catch became part of the Seam Solder core. The result is that a developer trying to include any Seam 3.1.0 module will be experiencing the above described NPE problem.

        My questions:
        1. The fix is currently targeted for the 2.0.0 release. In the planning board I saw that there is still a 1.1.4 and a 1.2.0 release to be released prior to the 2.0.0. Is it possible to also implement the fix in the upcoming 1.1.4 release?
        2. I'm using openwebbeans indirectly because I'm using IBM Websphere. As a consequence when OpenWebBeans releases a new version I'm still dependent on IBM to provide a new Websphere version including the upgrade of OpenWebBeans. This might take some time. Is there a temporary, manual code fix that I can apply to bypass/resolve the issue while waiting for the real fix?

        Kind regards

        Show
        Kris Vandebroek added a comment - Hi I'm experiencing the same problem with Seam Catch. In fact, since Seam 3.1.0, Seam Catch became part of the Seam Solder core. The result is that a developer trying to include any Seam 3.1.0 module will be experiencing the above described NPE problem. My questions: 1. The fix is currently targeted for the 2.0.0 release. In the planning board I saw that there is still a 1.1.4 and a 1.2.0 release to be released prior to the 2.0.0. Is it possible to also implement the fix in the upcoming 1.1.4 release? 2. I'm using openwebbeans indirectly because I'm using IBM Websphere. As a consequence when OpenWebBeans releases a new version I'm still dependent on IBM to provide a new Websphere version including the upgrade of OpenWebBeans. This might take some time. Is there a temporary, manual code fix that I can apply to bypass/resolve the issue while waiting for the real fix? Kind regards
        Hide
        Mark Struberg added a comment -

        We try to get this done before starting the 1.1.4 release process.

        Show
        Mark Struberg added a comment - We try to get this done before starting the 1.1.4 release process.
        Hide
        Mark Struberg added a comment -

        Well, according to the commits Rohit took the time and fixed that already. Kris, can you please try the latest 1.1.4-SNAPSHOT to make sure your problem will really be fixed when we ship the next version?

        Show
        Mark Struberg added a comment - Well, according to the commits Rohit took the time and fixed that already. Kris, can you please try the latest 1.1.4-SNAPSHOT to make sure your problem will really be fixed when we ship the next version?
        Hide
        Miguel ZP added a comment -

        Thanks Mark for the update and for caring about SEAM users! I'm sure everything is getting much better with DELTASPIKE
        Just one more question: Are there any pre-built snapshots to download? Didn't find any jars neither in the download section nor in the maven repository...

        Show
        Miguel ZP added a comment - Thanks Mark for the update and for caring about SEAM users! I'm sure everything is getting much better with DELTASPIKE Just one more question: Are there any pre-built snapshots to download? Didn't find any jars neither in the download section nor in the maven repository...
        Hide
        Mark Struberg added a comment -

        Sure, the apache.snapshots repo is here: https://repository.apache.org/content/repositories/snapshots/

        OWB will get deployed nightly via our jenkins build.

        Show
        Mark Struberg added a comment - Sure, the apache.snapshots repo is here: https://repository.apache.org/content/repositories/snapshots/ OWB will get deployed nightly via our jenkins build.
        Hide
        Mark Struberg added a comment -

        released with OWB-1.1.4

        Show
        Mark Struberg added a comment - released with OWB-1 .1.4

          People

          • Assignee:
            Rohit Dilip Kelapure
            Reporter:
            Thierry Robin
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development