1
resposta

ERROR - java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'

Ao assistir a aula de repository do curso, e implementar o que foi passado, quando vou rodar o programa tenho este problema. sinceramente já procurei em diversos lugares a solução porém nã consigo encontrar.

Executing pre-compile tasks... Running 'before' tasks Checking sources Copying resources... [crud] Checking dependencies… [crud] Dependency analysis found 0 affected files Updating dependency information… [crud] Parsing java… [crud] java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' Dependency analysis found 0 affected files Errors occurred while compiling module 'crud' javac 21 was used to compile java sources Finished, saving caches… Executing post-compile tasks... Finished, saving caches… Synchronizing output directories... 17/07/2023 11:39 - Build completed with 2 errors and 0 warnings in 2 sec, 38 ms

1 resposta

Oi!

No curso foi utilizado o Lombok, mas ele ainda não é compatível com o Java 21.

Utilize o Java 17 para evitar problemas de compatibilidade.