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

Pruteanu Dragos commented on GROOVY-11442:
------------------------------------------

The project is already using the JavaFX plugin. The issue could be related to 
Java modularization and classloader. An AST Tranformation is referring a class 
via Annotation, and the class cannot be found even if is in the same package.

The build.gradle contains few lines which were written for Java8, maybe the 
issue reside here:

```

configurations {
    jansi.extendsFrom(runtime)
}

sourceSets {
    demo {
        compileClasspath += sourceSets.main.output + configurations.compile
        runtimeClasspath += sourceSets.main.output

  }

}

```

> Could not find class for Transformation Processor
> -------------------------------------------------
>
>                 Key: GROOVY-11442
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11442
>             Project: Groovy
>          Issue Type: Bug
>          Components: ast builder
>    Affects Versions: 4.0.22
>            Reporter: Pruteanu Dragos
>            Priority: Major
>
> In this project: https://github.com/wise-coders/groovyfx., a fork of 
> [GroovyFX][http://groovyfx.org/] (see [source 
> code][https://github.com/groovyfx-project/groovyfx]). 
> Upgrading to OpenJDK 17 and Gradle 7.6 I get this error (which did not happen 
> under Java 8):
> ```
> Could not find class for Transformation Processor 
> groovyx.javafx.beans.FXBindableASTTransformation declared by 
> groovyx.javafx.beans.FXBindable
> ```
> The 
> [FXBindableASTTransformation][https://github.com/groovyfx-project/groovyfx/blob/master/src/main/groovy/groovyx/javafx/beans/FXBindableASTTransformation.java]
>  is used as annotation in 
> [FXBindable][https://github.com/groovyfx-project/groovyfx/blob/master/src/main/groovy/groovyx/javafx/beans/FXBindable.java].
> How can I prevent this error?
> You can test it by executing
> ```
> cd groovyfx
> gradlew build
> gradlew runAccordionDemo
> ```



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

Reply via email to