[crac] RFR: 8364449: [CRaC] Launch new main outside of the core C/R body [v5]

Radim Vansa rvansa at openjdk.org
Fri Aug 8 11:31:31 UTC 2025


On Fri, 8 Aug 2025 11:13:05 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> 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

OK, I meant this `assertEquals` would be put straight to the library, but this is fine by me.

-------------

Marked as reviewed by rvansa (Committer).

PR Review: https://git.openjdk.org/crac/pull/253#pullrequestreview-3100448957


More information about the crac-dev mailing list