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

Weld 1.1 breaks compatibility with groovy objects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.4.Final
    • 1.1.0.Final
    • Proxies
    • 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.

      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

              rhn-engineering-jharting Jozef Hartinger
              jeff.howard Jeff Howard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: