[ 
https://issues.apache.org/jira/browse/GROOVY-11706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18010253#comment-18010253
 ] 

Xiaotian Ma commented on GROOVY-11706:
--------------------------------------

[~blackdrag] Thanks a lot for your help. After trying many different solutions, 
I have decided to give up using a class loader to load two different versions 
of the Groovy compiler. I am planning to switch to using two different process 
communication solutions because the two different Groovy compilers in the class 
path will always inexplicably interfere with each other. Perhaps some modules 
cannot be parallelized, or perhaps it is caused by certain mechanisms of the 
JVM's underlying class loader. In short, this issue seems like magic, and I 
have ultimately given up this idea. Thank you again for your help.

> How to run Groovy compiler via class loader without altering thread context 
> classloader?
> ----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11706
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11706
>             Project: Groovy
>          Issue Type: Question
>          Components: Compiler
>            Reporter: Xiaotian Ma
>            Priority: Major
>         Attachments: screenshot-1.png
>
>
> When using direct reflection access to the main method of the 
> FileSystemCompiler class, some transformer classes do not seem to load 
> correctly. (The error is: Could not find class for Transformation Processor 
> org.codehaus.groovy.transform.trait.TraitASTTransformation declared by 
> groovy.transform.Trait)
> My original requirement was to use code instead of accessing multiple Groovy 
> compilers simultaneously from the command line. Since different versions 
> cannot coexist, I need to use classLoader to isolate them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to