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

Weld 1.1 breaks compatibility with groovy objects

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.1.0.Final
    • Fix Version/s: 2.2.4.Final
    • Component/s: Proxies
    • Labels:
    • Environment:

      Groovy 1.7.6, tomcat 6, weld 1.1, JSF 2 (mojarra 2.0.3)

    • Steps to Reproduce:
      Hide

      See the referenced forum thread above for more detail
      Repro is fairly simple. Create a normal scoped groovy bean (scoped so that weld creates a proxy) and inject it into another groovy bean. Access methods or properties of the injected bean and watch as the exceptions start flying. Note that accessing a property of an injected bean from EL may not trigger this bug due to the way EL resolves statements.

      Show
      See the referenced forum thread above for more detail Repro is fairly simple. Create a normal scoped groovy bean (scoped so that weld creates a proxy) and inject it into another groovy bean. Access methods or properties of the injected bean and watch as the exceptions start flying. Note that accessing a property of an injected bean from EL may not trigger this bug due to the way EL resolves statements.

      Description

      Weld created proxies need to know how to work with groovy objects. Currently, weld is attempting to proxy the methods from the groovy.lang.GroovyObject interface which is confusing the groovy runtime. Groovy objects have a per-class metaclass that is getting used with the wrong class instances.
      Also, weld is using hyphen characters in the generated proxy class names, which breaks groovy's dynamic invoke mechanism.
      The referenced forum thread contains a patch that addresses the groovy incompatabilities in weld's ProxyFactory.java

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jharting Jozef Hartinger
                  Reporter:
                  jeff.howard Jeff Howard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: