Closed fipro78 closed 11 months ago
@TobiAjila
@fipro78 Sure, I can help you take a look.
Do you have a repo I can look at to reproduce the issue. Or something you can zip up? It will help speed up the diagnosis.
@tajila I have created a new branch in my deployment benchmark example repository:
https://github.com/fipro78/osgi_deployment_options/tree/criu
The project that contains the CRIUSupport usage is in org.fipro.osgi.benchmark.criu
If you build from the root directory via
mvn clean verify -Pcriu
the .criu modules are build and you should see the error. This at least happens for me if I execute the build in a devcontainer, whose definition is also available in the repository.
I was able to reproduce the issue.
I added <arg>-verbose</arg>
to the compiler args and I see:
[loading /BCDEF/jdk.management.jfr/module-info.sig]
[loading /BCDEFG/java.instrument/module-info.sig]
[loading /BCDEFG/jdk.hotspot.agent/module-info.sig]
We dont ship with that module, so the issue is that it is using javac from a non-OpenJ9 JDK.
I added <executable>/path/to/semeru/jdk-17.0.8.1+1/bin/javac</executable>
in the configuration for <artifactId>maven-compiler-plugin</artifactId>
but that didnt seem to have an effect.
It seems to be an issue with the plexus-compiler-javac
compiler plugin. If I switch to the plexus-compiler-eclipse
compiler plugin, the build succeeds.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerId>eclipse</compilerId>
<release>${java.version}</release>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.13.0</version>
</dependency>
</dependencies>
</plugin>
@fipro78 Thanks for resolving this. Feel free to reach out if you run into anymore issues with openj9.criu
Hi,
I am trying to create a project that contains code to create a checkpoint on an initial startup, similar to what is described here: https://blog.openj9.org/2022/09/26/getting-started-with-openj9-criu-support/
I have setup a Linux devcontainer that contains the IBM Semeru 17.0.8.1+1
My VSCode is able to resolve the import
org.eclipse.openj9.criu.CRIUSupport
. But the Maven build fails, telling it can not resolveorg.eclipse.openj9.criu.CRIUSupport
.I have even tried it by specifying the
openj9.criu
module in the compile plugin, but then it says it can not find theopenj9.criu
module.Running the build with -X shows the following output for the project:
From that output it definitely looks like it uses the OpenJ9 for the compilation. It even shows that
org.eclipse.openj9.criu.isCRIUCapable: true
. But why doesn't it resolve the package at build time? Is there anything else I need to configure to make the package and the contained classes available to the Maven build?I have searched for an answer and tried multiple things, but I can't find any pointer. Would be great if you could help me in resolving this.
Greez, Dirk