I'm into modular Java for a few months now, with Spring and related ecosystem stuff. And one of the most frustrating experiences is debugging module issues with unclear names
Here is the last error of this kind I got:
java.lang.IllegalAccessError: superclass access check failed: class com.oracle.truffle.polyglot.PolyglotImpl (in unnamed module @0x58a90037) cannot access class org.graalvm.polyglot.impl.AbstractPolyglotImpl (in module org.graalvm.sdk) because module org.graalvm.sdk does not export org.graalvm.polyglot.impl to unnamed module @0x58a90037
@0x58a90037
is the problem here.
Depending on what I am going, I will randomly try spring.beans
, spring.context
, javax.validation
etc... And open my module to the world, which somehow removes the value of encapsulating them in the first place.
For this specific case, I tried which didn't got well, but requires org.graalvm.sdk;
requires org.graalvm.js;
did it.
Debugging by random attempts doesn't really seem like a smart way of tackling these issues. So I wonder how you guys do it.
Thank you!