Skip to content

FISH-12969 Payara Server Startup Fails in Apache NetBeans IDE Due to the CRaCCheckpointTo Option#9237

Merged
jGauravGupta merged 1 commit intoapache:masterfrom
jGauravGupta:FISH-12969
Apr 10, 2026
Merged

FISH-12969 Payara Server Startup Fails in Apache NetBeans IDE Due to the CRaCCheckpointTo Option#9237
jGauravGupta merged 1 commit intoapache:masterfrom
jGauravGupta:FISH-12969

Conversation

@jGauravGupta
Copy link
Copy Markdown
Contributor

Payara Server startup may fail in Apache NetBeans when domain.xml contains
the JVM option:

-XX:CRaCCheckpointTo=...

This option is only supported by CRaC-enabled JDKs. The IDE
previously filtered JVM options only by version and vendor, without checking
whether the selected JDK supports CRaC. As a result, non-CRaC JDKs failed to
start with “Unrecognized VM option” errors.

This PR enhances JDKVersion.isCorrectJDK(...) to additionally validate
CRaC-related options. CRaC options are now applied only if the selected
server JDK (javaHome) contains lib/criu, indicating CRaC support.

No changes to existing vendor/version logic. Standard JDK behavior remains
unchanged.

@jGauravGupta jGauravGupta added Java EE/Jakarta EE [ci] enable enterprise job labels Feb 27, 2026
Copy link
Copy Markdown

@simonladen simonladen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, with Payara 6.34.0.
Server starts/stops without error.

@apache apache locked and limited conversation to collaborators Mar 2, 2026
@apache apache unlocked this conversation Mar 2, 2026
@matthiasblaesing
Copy link
Copy Markdown
Contributor

@jGauravGupta if you change the labels after creation of the PR, the tests don't automatically get executed again. In these cases please use the following "trick" to force rerun of tests:

Use "Lock conversation" and immediately unlock again. That acts as a trigger.

I did this right now.

@jGauravGupta jGauravGupta added this to the NB30 milestone Mar 26, 2026
@jGauravGupta
Copy link
Copy Markdown
Contributor Author

Thanks @matthiasblaesing for the hint. I’ll follow it and add the label before creating the PR. I’ll need your review as the PR fixes a critical issue.

Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make sense to add the info "isCracSupportedtoJDKVersionand then pass the wholeJvmOption` instead of the long list of arguments?

.map(home -> new java.io.File(home, "lib/criu"))
.map(java.io.File::exists)
.orElse(false);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my POV this is a property of the JDK so I would see this as part of JDKVersion?

@apache apache locked and limited conversation to collaborators Apr 8, 2026
@apache apache unlocked this conversation Apr 8, 2026
Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash and update the signature file. I left an inline comment to minimize exposure of moving parts.

Given that the current cycle ends, this is friend-only and this needs to be fixed, I'm ok with this, but JDKVersion, its use of Optional and now two different ways to get the necessary information (most information is present from construction time, it is unclear why that is not done for CRaC support), is really ugly.

@jGauravGupta jGauravGupta force-pushed the FISH-12969 branch 3 times, most recently from 45bf2d8 to e49df5b Compare April 8, 2026 21:14
@jGauravGupta
Copy link
Copy Markdown
Contributor Author

jGauravGupta commented Apr 9, 2026

Hi @matthiasblaesing,

I need some help. The sigtest is throwing the following error:

  "E1.2 - API type removed" : method public final boolean org.netbeans.modules.payara.tooling.data.JDKVersion.isOptionSupported(org.netbeans.modules.payara.tooling.server.parser.JvmConfigReader.JvmOption,java.lang.String)

However, this method is newly introduced.

@jGauravGupta jGauravGupta force-pushed the FISH-12969 branch 2 times, most recently from c797123 to e1813c5 Compare April 9, 2026 14:25
@matthiasblaesing
Copy link
Copy Markdown
Contributor

It seems, that sigtest is position dependent. I can reproduce the problem locally. Invoking ant -f enterprise/payara.tooling check-sigtest gives me:

[...]
SignatureTest report
Base version: 2.26
Tested version: 2.27
Check mode: bin [throws removed]
Constant checking: on


Class org.netbeans.modules.payara.tooling.data.JDKVersion
  "E1.2 - API type removed" : method public final boolean org.netbeans.modules.payara.tooling.data.JDKVersion.isOptionSupported(org.netbeans.modules.payara.tooling.server.parser.JvmConfigReader.JvmOption,java.lang.String)



BUILD FAILED
/home/matthias/src/netbeans/nbbuild/templates/projectized.xml:823: Signature tests return code is wrong (1), check the messages above

Total time: 3 seconds

If I then run ant -f enterprise/payara.tooling gen-sigtest to regenerate the sigtest, I get a slightly different file then the one this PR holds:

diff --git a/enterprise/payara.tooling/nbproject/org-netbeans-modules-payara-tooling.sig b/enterprise/payara.tooling/nbproject/org-netbeans-modules-payara-tooling.sig
index 0fccd8d42bd1..08cc94f11239 100644
--- a/enterprise/payara.tooling/nbproject/org-netbeans-modules-payara-tooling.sig
+++ b/enterprise/payara.tooling/nbproject/org-netbeans-modules-payara-tooling.sig
@@ -1,5 +1,5 @@
 #Signature file v4.1
-#Version 2.26
+#Version 2.27
 
 CLSS public abstract interface java.io.Closeable
 intf java.lang.AutoCloseable
@@ -1238,6 +1238,7 @@ CLSS public final org.netbeans.modules.payara.tooling.data.JDKVersion
 meth public boolean equals(java.lang.Object)
 meth public boolean ge(org.netbeans.modules.payara.tooling.data.JDKVersion)
 meth public boolean gt(org.netbeans.modules.payara.tooling.data.JDKVersion)
+meth public boolean isOptionSupported(org.netbeans.modules.payara.tooling.server.parser.JvmConfigReader$JvmOption,java.lang.String)
 meth public boolean le(org.netbeans.modules.payara.tooling.data.JDKVersion)
 meth public boolean lt(org.netbeans.modules.payara.tooling.data.JDKVersion)
 meth public int hashCode()
@@ -1248,7 +1249,6 @@ meth public java.util.Optional<java.lang.Short> getUpdate()
 meth public java.util.Optional<java.lang.String> getVM()
 meth public java.util.Optional<java.lang.String> getVendor()
 meth public short getMajor()
-meth public boolean isOptionSupported(org.netbeans.modules.payara.tooling.server.parser.JvmConfigReader.JvmOption,java.lang.String)
 meth public static org.netbeans.modules.payara.tooling.data.JDKVersion getDefaultPlatformVersion()
 meth public static org.netbeans.modules.payara.tooling.data.JDKVersion toValue(java.lang.String)
 meth public static org.netbeans.modules.payara.tooling.data.JDKVersion toValue(java.lang.String,java.lang.String)

I suggest, that you do that to and amend the commit with that change. That should clear it up.

Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I think this is good to merge.

@jGauravGupta
Copy link
Copy Markdown
Contributor Author

sigtest is position dependent

Thanks @matthiasblaesing for help!

@jGauravGupta jGauravGupta merged commit 26cc860 into apache:master Apr 10, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java EE/Jakarta EE [ci] enable enterprise job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants