superclass access check failed
2024-01-14 13:19

java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x603e2fc3) cannot access class com.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.main to unnamed module @0x603e2fc3

I am facing this issue while compiling code with Iguana beta version.




other answer :

It looks like youre encountering a java.lang.IllegalAccessError related to superclass access check failed. This issue usually occurs when there is a conflict or inappropriate access to a class in different modules.

In your case, the error message indicates that the class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler is trying to access the class com.sun.tools.javac.main.JavaCompiler, but its unable to do so due to module restrictions.

Here are a few steps you can try to resolve this issue:

Check Dependencies: Ensure that your project dependencies and versions are compatible with each other. Sometimes, conflicts arise due to incompatible library versions.

Update Dependencies: If youre using a beta version of Iguana, check for any updates or patches that might address this issue. Beta versions can have bugs that get fixed in subsequent releases.

Module Declarations: Verify if your project or any of its dependencies are using module declarations (module-info.java). Ensure that the required packages are exported and accessible.

Java Compiler Version: Confirm that youre using a compatible version of the Java compiler. Its possible that the Iguana beta version expects a specific version of the compiler.

Contact Iguana Support: If the issue persists, consider reaching out to Iguanas support or community forums. They may have encountered similar issues and could provide specific guidance or solutions.

Without more context about your project setup and dependencies, these are general suggestions. If the issue persists or you have more details, feel free to provide additional information for a more targeted solution.