Upgrading Payara Server

There are two valid methods of fully upgrading to a new release of Payara Community Edition. Either of the following two methods would work in most circumstances:

  1. Backing up and restoring the existing configuration to a new installation. Read Backup and Restore Method

  2. Maintaining completely separate domain and node directories and pointing the new version to the existing directories. Read Domain and Node Directories Method

JDK 11: Upgrade Considerations

Applies when upgrading to Payara Server 5.192 and superior releases

The domain.xml configuration file contains instructions for handling JDK 11. Without these instructions, Payara Server will not start up on JDK 11 and/or will throw many exceptions during runtime.

If older, pre-5.192, domains are being migrated to Payara Server 5.192 or above, this has to be taken into account. The following jvm-options have to be added to the java-config element in domain.xml:

<jvm-options>[9|]--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=java.base/java.nio=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=java.management/sun.management=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]--add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED</jvm-options>
<jvm-options>[9|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar</jvm-options>

The following jvm-options have to be removed:

<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>

JDK 17: Upgrade Considerations

Applies when upgrading to Payara Community 5.2021.9 and superior releases

The domain.xml configuration file contains instructions for handling JDK 17. Without these instructions, Payara Server will not start up on JDK 17 and/or will throw many exceptions during runtime.

If older, pre-5.192, domains are being upgraded, follow the JDK 11 upgrade considerations steps first, then come back to the JDK 17 upgrade considerations.

If older, pre-5.2021.9, domains are being upgraded to Payara Server 5.2021.9 or above, this has to be taken into account. The following jvm-options have to be added to the java-config element in domain.xml:

<jvm-options>[17|]--add-exports=java.base/sun.net.www=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.base/sun.security.util=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.invoke=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.desktop/java.beans=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED</jvm-options>