Skip to main content

Migration to version 4.6

Introduction

This article describes the migration path to version 4.6. Please note it is advisable to create a backup before the migration.

In the version 4.5, object storage was introduced as an optional way of storing the data. In version 4.6, object storage is obligatory.

New installations should always use the newest base package, which can be found in web ftp server. Link to web ftp: https://webftp.priint.com/WebInterface/login.html. Base package can be found in “priint_suite_(version)/publishing server base zips/latest/PubServer_Base_(version/revision)-Windows.7z” (Windows version) or “priint_suite_(version)Linux)/publishing server base zips/latest/PubServer_Base(version/revision)_UbuntuLinux.deb” (Linux version).

Migration to version 4.6.

Generally, you should note the hints regarding Comet Project Configuration

Upgrade from 4.1.8

Direct update to version 4.6. is not possible. Please take the following steps.

Update to version 4.1.9

Please update your version to version 4.1.9. The following actions need to be taken before the update.

  • Payara upgrade to version 2020.5 is needed before migration. Please check the article How-to Update Payara in an Existing Pubserver for more details.

  • Please clean up the following directories: glassfish\payara6\glassfish\domains\pubserver\generated, glassfish\payara6\glassfish\domains\pubserver\osgi-cache, glassfish\payara6\glassfish\domains\pubserver\lib\databases

  • Check your domain.xml if the following jvm-options for grizzly-npn-bootstrap exist for the java version you use. If needed please add them:

<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
<jvm-options>[1.8.0u191|1.8.0u250]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
<jvm-options>[1.8.0u251|]-Xbootclasspath/a:${com.sun.aas.installRoot}/lib/grizzly-npn-api.jar</jvm-options>

Upgrade from 4.1.9

The following actions need to be taken before the update.

  • migrate payara 2020.5 to 2022.5 from the base package 4.6. Please check the article How-to Update Payara in an Existing Pubserver for more details.

  • add jdk 17 to the java folder of your PubServer. The directory of the JDK 17 should have the name jdk. If needed, please check the base package for version 4.6. to find JDK 17 (folder java/jdk).

  • Check your domain.xml and add the following jvm-options:

<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>
<jvm-options>[17|]--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.ref=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED</jvm-options>

Upgrade from 4.2.0

Please follow the below steps:

  • Please clean up the following directories: glassfish\payara6\glassfish\domains\pubserver\generated, glassfish\payara6\glassfish\domains\pubserver\osgi-cache, glassfish\payara6\glassfish\domains\pubserver\lib\databases

  • add jdk 17 to the java folder of your PubServer. The directory of the JDK 17 should have the name jdk. If needed, please check the base package for version 4.6. to find JDK 17 (folder java/jdk).

  • Check your domain.xml and add the following jvm-options:

<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>
<jvm-options>[17|]--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.ref=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED</jvm-options>

Upgrade from 4.3.0

Please follow the below steps:

  • Please clean up the following directories: glassfish\payara6\glassfish\domains\pubserver\generated, glassfish\payara6\glassfish\domains\pubserver\osgi-cache, glassfish\payara6\glassfish\domains\pubserver\lib\databases
  • add jdk 17 to the java folder of your PubServer. The directory of the JDK 17 should have the name jdk. If needed, please check the base package for version 4.6. to find JDK 17 (folder java/jdk).
  • Check your domain.xml and add the following jvm-options:
<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>
<jvm-options>[17|]--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.ref=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED</jvm-options>

Upgrade from 4.4.0

Please follow the below steps:

  • Please clean up the following directories: glassfish\payara6\glassfish\domains\pubserver\generated, glassfish\payara6\glassfish\domains\pubserver\osgi-cache, glassfish\payara6\glassfish\domains\pubserver\lib\databases
  • add jdk 17 to the java folder of your PubServer. The directory of the JDK 17 should have the name jdk. If needed, please check the base package for version 4.6. to find JDK 17 (folder java/jdk).
  • Check your domain.xml and add the following jvm-options:
<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>
<jvm-options>[17|]--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.ref=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED</jvm-options>

Migration to version 4.6.0 with object storage

Please consult the following documents to check how to configure object storage for Priint:Suite:

Migration to version 4.6.0 for Payara 6

Backup old data!

  • Backup the SQL database used for Priint:Suite.
  • Backup your Jackrabbit repository. (Copy the directory <pubserver_dir>\database\Jackrabbit.) or create a selective Export of parts of the Java Content Repository (Jackrabbit).
  • Backup your keystore. (It contains the Pubserver license!) (Copy the file <pubserver_dir>\glassfish\payara5\glassfish\domains\pubserver\config\keystore.jks.)

Create a new Payara

  • Restore the SQL server.
  • Install a fresh Priint:Suite in version 4.6.0.
  • Restore Jackrabbit by moving the backed up directory back to the Pubserver directory (the <pubserver_dir>\database\Jackrabbit in the new installation) or import your selective Java Content Repository Export (Jackrabbit).
  • Please be aware if you copy the complete Jackrabbit directory to the new installation, that you need to check and correct the path of the documents / document templates in the ServerProperties (xml) configuration. This path is used in the Migration processes for importing documents, document templates to object storage.
  • Convert and restore the keystore. The keystore changed format from jks to p12 in the Payara 6. The program, that can be used to convert it, is included in Java installation. The command to do it is (in the directory containing keystore.jks):
    keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12
    This command will create a file keystore.p12 which needs to be moved to <pubserver_dir>\glassfish\payara5\glassfish\domains\pubserver\config\ in the new installation.

Execute Camunda process to migrate documents, document templates and snippets.

  • To migrate your documents, document template from the file system to the object storage execute the Camunda Process described here.
  • To migrate your snippets from the file system to the object storage execute the Camunda Process described here.

Migrate custom Java plugins

The new version of Payara runs in Java 17, which unfortunately has backward compatibility issues, due to removal of many of the libraries from the package javax. (Most of them is now available in the package jakarta instead.)

For this reason, most of the custom plugins won't work without editing their code. They need to be migrated to Java 17. IDEs usually have tools that can aid that process.

IntelliJ

IntelliJ has a build in functionality to convert code of any project to Jakarta EE.

  • In the menu bar go to "Refactor" / "Migrate Packages and Classes" / "Java EE to Jakarta EE". (It will automatically replace import statements in the code wherever it's necessary.)
  • Fix the build script by adding missing Jakarta libraries. (Javax libraries were provided with the Java virtual machine, while Jakarta need to be obtained from an external repository.)
  • For potential compilation errors that may result from changes in API of some of these libraries.
  • Test the plugin.

Eclipse

Eclipse has a plugin in the official marketplace that allows to convert code of Maven projects to Jakarta EE.

  • Make sure Maven is installed in your system.
  • In case of a Gradle project, generate the file pom.xml using the task generatePomFileForAllArtifactsPublication. (The resulting file is build/publications/allArtifacts/pom-default.xml, so it needs to be renamed and moved to the project's root directory.)
  • In the menu bar go to "Help" / "Eclipse marketplace..." and install the plugin "Payara Tools".
  • Right-click on the project and go to "Payara Refactor" / "Transform to Jakarta EE 10".
  • Select an output path that not in the project's directory. (A new directory will be created for the converted project.)
  • Fix the build script by adding missing Jakarta libraries. (Javax libraries were provided with the Java virtual machine, while Jakarta need to be obtained from an external repository.)
  • For potential compilation errors that may result from changes in API of some of these libraries.
  • Test the plugin.

Payara Transformer

There is a standalone tool that allows to ad hoc convert a jar file to Jakarta EE. This can be used as a temporary measure.

  • Download the latest jar file (fish.payara.transformer).
  • Run the transformer in terminal, giving it the jar file to convert as an argument: java -jar fish.payara.transformer.jar my-program.jar.