[crac] RFR: 8364449: [CRaC] Launch new main outside of the core C/R body [v5]
Timofei Pushkin
tpushkin at openjdk.org
Fri Aug 8 11:13:05 UTC 2025
> New main is now launched after restoration completes solving the issues outlined in the JBS task.
>
> Also the error message when the new main is not found (e.g. the feature is used by accident like in https://github.com/spring-projects/spring-framework/issues/33226) or throws an exception should become less cryptic:
>
> $ java -XX:CRaCRestoreFrom=cr -jar app.jar
> Exception in thread "main" jdk.crac.RestoreException
> Suppressed: java.lang.Exception: Failed to execute the new main entry: new initial class = 'app.jar', new main arguments = []. Do not specify these if you just wish to continue the checkpointed execution.
> at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:314)
> at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:263)
> at jdk.crac/jdk.crac.Core.checkpointRestore(Core.java:73)
> at Main.main(Main.java:4)
> Caused by: java.lang.ClassNotFoundException: app.jar
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
> at java.base/java.lang.Class.forName0(Native Method)
> at java.base/java.lang.Class.forName(Class.java:547)
> at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:302)
> ... 3 more
Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision:
Use Asserts for exception validation
-------------
Changes:
- all: https://git.openjdk.org/crac/pull/253/files
- new: https://git.openjdk.org/crac/pull/253/files/fb5295f7..8f2cd6d1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=crac&pr=253&range=04
- incr: https://webrevs.openjdk.org/?repo=crac&pr=253&range=03-04
Stats: 25 lines in 1 file changed: 7 ins; 12 del; 6 mod
Patch: https://git.openjdk.org/crac/pull/253.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/253/head:pull/253
PR: https://git.openjdk.org/crac/pull/253
More information about the crac-dev
mailing list