Skip to content

[GR-66090] [GR-65831] Update IGV to support JDK24 #11421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

graalvmbot
Copy link
Collaborator

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 17, 2025
@JaroslavTulach
Copy link
Contributor

Cannot Run IGV

Cannot Run Tests

graalvm/graal/visualizer/IdealGraphVisualizer$ JAVA_HOME=~/bin/graalvm-24/ mvn clean install
...
[INFO] --- surefire:2.12.2:test (default-test) @ Data ---
[INFO] Surefire report directory: /graalvm/graal/visualizer/IdealGraphVisualizer/Data/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.IllegalAccessError: superinterface check failed: class org.graalvm.visualizer.data.ControllableChangedListener (in unnamed module @0x1376c05c) cannot access class jdk.graal.compiler.graphio.parsing.model.ChangedListener (in module jdk.graal.compiler) because module jdk.graal.compiler does not export jdk.graal.compiler.graphio.parsing.model to unnamed module @0x1376c05c
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:962)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:132)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:776)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:691)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:620)

Cannot Build on GraalVM 24

/graal/visualizer/IdealGraphVisualizer$ JAVA_HOME=~/bin/graalvm-24/ mvn clean install -DskipTests
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project Util: Compilation failure: Compilation failure: 
[ERROR] /home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/Util/src/main/java/org/graalvm/visualizer/util/GraphTypes.java:[74,36] cannot find symbol
[ERROR]   symbol:   variable Bundle
[ERROR]   location: class org.graalvm.visualizer.util.GraphTypes
[ERROR] /home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/Util/src/main/java/org/graalvm/visualizer/util/PropertiesSheet.java:[90,53] cannot find symbol
[ERROR]   symbol:   variable Bundle
[ERROR]   location: class org.graalvm.visualizer.util.PropertiesSheet.IndexedObjectProperty
[ERROR] /home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/Util/src/main/java/org/graalvm/visualizer/util/PropertiesSheet.java:[110,53] cannot find symbol
[ERROR]   symbol:   variable Bundle
[ERROR]   location: class org.graalvm.visualizer.util.PropertiesSheet.IndexedObjectProperty
[ERROR] /home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/Util/src/main/java/org/graalvm/visualizer/util/PropertiesSheet.java:[204,53] cannot find symbol

probably related to annotation processors being off by default on JDK24, if there was such a change...

@tkrodriguez
Copy link
Member

I was kind of ignoring the build on JDK 24 part as there are other issues there and we always build on an earlier release. It does seem like you have to explicitly enable annotation processing in JDK 24. I'll see if I can get that working. As we've discussed elsewhere, some of the unit tests will fail on JDK24 for reasons I don't understand, but it's not a major priority for IGV to build on JDK 24 so if those can't be resolved simply then I will them for now.

@tkrodriguez
Copy link
Member

Enabling proc:full lets it build on JDK 24 and it also seems to resolve the unit test failures I was seeing with FilterProfileAdapterTest. I'm guessing annotations within the unit tests weren't being process which led to the failures. Thanks for figuring this out!

@tkrodriguez
Copy link
Member

So the only remaining GraalVM 24 problem is that the OpenIDE-Module-Hide-Classpath-Packages: fixes don't seem to be respected by the unit tests. So mx unittest fails with GraalVM 24 with the original java.lang.IllegalAccessError problems but passes with Oracle JDK 24. Any more tricks up your sleeve? The only option would be run the unit tests with -XX:-UseJVMCICompiler -XX:-EnableJVMCI with GraalVM.

@tkrodriguez
Copy link
Member

So I think it's all working now. It runs IGV without extra arguments on GraalVM 24 and the unittest tests all pass on JDK 24. The annotation processing changes in JDK 24 seems to be causing build and unit test failures. I did have to include a workaround so that the unit tests would work on GraalVM JDK 24.

@JaroslavTulach
Copy link
Contributor

I can confirm that:

graal/visualizer/IdealGraphVisualizer$ git log | head -n1
commit b6f717429f60fcee3506ae0518ded1af709aeb73

graal/visualizer/IdealGraphVisualizer$ export JAVA_HOME=/graalvm-24/ 
graal/visualizer/IdealGraphVisualizer$ mvn clean install

builds and tests OK. I can even start it with:

graal/visualizer/IdealGraphVisualizer$ export JAVA_HOME=/graalvm-24/ 
graal/visualizer/IdealGraphVisualizer$ mvn -f application/ nbm:cluster-app nbm:run-platform

and open .bgv files without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants