groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jex Jexler (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-8108) Groovy sources with Grape grabs fail to load from bytecode (race condition)
Date Sun, 05 Mar 2017 09:45:32 GMT
Jex Jexler created GROOVY-8108:
----------------------------------

             Summary: Groovy sources with Grape grabs fail to load from bytecode (race condition)
                 Key: GROOVY-8108
                 URL: https://issues.apache.org/jira/browse/GROOVY-8108
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
            Reporter: Jex Jexler


The bytecode of Groovy sources with Grape grabs contains a static initializer that calls Grape#grab(...).
But since the bytecode also references classes that can only be loaded after grabbing the
dependencies and adding them to a parent class loader, loading such referenced classes may
fail due to a race condition with a NoClassDefFoundError.

See the thread titled "Grape and loading classes that extend java.lang.Exception from compiled
Groovy bytecode" in the Groovy Dev Mailing List of Feb/Mar 2017 for sample sources and discussion:

http://groovy.329449.n5.nabble.com/Grape-and-loading-classes-that-extend-java-lang-Exception-from-compiled-Groovy-bytecode-tp5738786.html

Although it appears almost certain that no fix will be possible, except maybe as part of a
redesign for major release, I am reporting this so that it is documented.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message