glassfish
  1. glassfish
  2. GLASSFISH-16186

Unable to convert ejbRef for ejb to a business object, the container picks the wrong interface

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 4.0_b85
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Windows 7 x86, JDK 1.6.0_24, Glassfish 3.1 GA, JSF2.

      Description

      I've been converting a quite big site from EE5 to EE6, with CDI of course.
      There's ONE sole thing that bugs me but it's quite peculiar.

      I have:

      • @Named @Stateless TimeProviderImpl extends SimpleTimeProvider implements LocalTimeProvider.
      • SimpleTimeProvider implements TimeProvider (the latter defining some methods, the former implementing them. No annotations.)
      • LocalTimeProvider is @Local and also extends TimeProvider and does nothing more.

      If I read the EJB 3.1 spec §4.9.7, I believe I'm still compliant.

      Now, if I try to access this EJB from my web application with EL or through a ManagedBean where it's @Inject injected, I get the exception below.
      If I try to access it through the ManagedBean where it's @EJB injected, my page displays correctly (as it used to work in EE5).

      Example and logs are attached. Deploy EAR and call http://localhost:8080/TrucWeb/test.jsf

      We're somewhere around these but it's slightly different.
      http://java.net/jira/browse/GLASSFISH-13040
      http://java.net/jira/browse/GLASSFISH-11140
      https://issues.jboss.org/browse/WELD-301
      https://issues.jboss.org/browse/WELD-305
      https://issues.jboss.org/browse/WELD-381
      https://issues.jboss.org/browse/WELD-625

      If i had to take a wild guess I'd say the issue lies in the Glassfish/Weld integration.

      1. GLASSFISH-16186.log
        13 kB
        fabmars

        Activity

        Hide
        scatari added a comment - - edited

        https://issues.jboss.org/browse/WELD-921 seems to be fixed in 1.2.0 Beta1. We recently integrated 1.1.4 to GF 3.1.2. Can we selectively port fixes from 1.2.0 to 1.1.4?

        Show
        scatari added a comment - - edited https://issues.jboss.org/browse/WELD-921 seems to be fixed in 1.2.0 Beta1. We recently integrated 1.1.4 to GF 3.1.2. Can we selectively port fixes from 1.2.0 to 1.1.4?
        Hide
        Sivakumar Thyagarajan added a comment -

        @scatari: Selectively including fixes from another branch, would require GlassFish to create a modified release of Weld, and so we are not doing that. The fix for WELD-921 has only been targetted for 1.2.0.Beta1 IIRC.

        Marking this issue as "3_1_2_exclude", as a fix doesn't seem to be available in the 3.1.2 timeframe.

        Show
        Sivakumar Thyagarajan added a comment - @scatari: Selectively including fixes from another branch, would require GlassFish to create a modified release of Weld, and so we are not doing that. The fix for WELD-921 has only been targetted for 1.2.0.Beta1 IIRC. Marking this issue as "3_1_2_exclude", as a fix doesn't seem to be available in the 3.1.2 timeframe.
        Hide
        Sivakumar Thyagarajan added a comment -

        Transferring to JJ Snyder

        Show
        Sivakumar Thyagarajan added a comment - Transferring to JJ Snyder
        Hide
        tlcksnyder added a comment -

        Weld bug https://issues.jboss.org/browse/WELD-921 is targeted for Weld 2.0.0.CR1. Retest with CR1.

        Show
        tlcksnyder added a comment - Weld bug https://issues.jboss.org/browse/WELD-921 is targeted for Weld 2.0.0.CR1. Retest with CR1.
        Hide
        jjsnyder83 added a comment -

        Committed revision 61099.

        Show
        jjsnyder83 added a comment - Committed revision 61099.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            fabmars
          • Votes:
            11 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: