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.xmlif the followingjvm-optionsforgrizzly-npn-bootstrapexist 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>
-
please follow How-to Update Payara in an Existing Pubserver - step 13 to add priint_camunda schema and privileges to the
priintadminuser. -
upgrade the included MySQL Database version to 8.0. Please consult the following article: https://kb.priint.com/index.php/article/how-to-upgrading-the-included-mysql-database-version-to-8-0/
-
take the steps from the next section to update to version 4.6.
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 (folderjava/jdk). -
Check your
domain.xmland 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>
- install
priint-bpm. Please check the article priint-bpm on Linux or priint-bpm on Windows accordingly. - install
rendering-service. Please check the article Rendering-service on Windows or Rendering-service on Linux accordingly.- For installations using PDF renderer, please consult the article Rendering-service 4.6 with priint:pdf renderer Setup Guide for Ubuntu 22.04.3 LTS.
- If you are using Adobe InDesign Server®, please consult these instructions and make sure a proper version of Comet Plugins is installed with InDesign.
- update using the updater of version 4.6.
- make sure you migrated the documents to object storage.
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 (folderjava/jdk). -
Check your
domain.xmland 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>
- install
priint-bpm. Please check the article priint-bpm on Linux or priint-bpm on Windows accordingly. - if needed, install
rendering-service. If you had it installed before, these instructions should guide you throuh a an update needed. If you need to install it from scratch, please check the article Rendering-service on Windows or Rendering-service on Linux accordingly.- For installations using PDF renderer, please consult the article Rendering-service 4.6 with priint:pdf renderer Setup Guide for Ubuntu 22.04.3 LTS.
- If you are using Adobe InDesign Server®, please consult these instructions and make sure a proper version of Comet Plugins is installed with InDesign.
- update using the updater of version 4.6.
- make sure you migrated the documents to object storage.
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 (folderjava/jdk). - Check your
domain.xmland 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>
- if needed, install
priint-bpm. Please check the article priint-bpm on Linux or priint-bpm on Windows accordingly. - if needed, install
rendering-service. If you had it installed before, these instructions should guide you throuh a an update needed. If you need to install it from scratch, please check the article Rendering-service on Windows or Rendering-service on Linux accordingly.- For installations using PDF renderer, please consult the article Rendering-service 4.6 with priint:pdf renderer Setup Guide for Ubuntu 22.04.3 LTS.
- If you are using Adobe InDesign Server®, please consult these instructions and make sure a proper version of Comet Plugins is installed with InDesign.
- update using the updater of version 4.6.
- make sure you migrated the documents to object storage.
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 (folderjava/jdk). - Check your
domain.xmland 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>
- if needed, install
priint-bpm. Please check the article priint-bpm on Linux or priint-bpm on Windows accordingly. - if needed, install
rendering-service. If you had it installed before, these instructions should guide you throuh a an update needed. If you need to install it from scratch, please check the article Rendering-service on Windows or Rendering-service on Linux accordingly.- For installations using PDF renderer, please consult the article Rendering-service 4.6 with priint:pdf renderer Setup Guide for Ubuntu 22.04.3 LTS.
- If you are using Adobe InDesign Server®, please consult these instructions and make sure a proper version of Comet Plugins is installed with InDesign.
- update using the updater of version 4.6.
- make sure you migrated the documents to object storage.
Migration to version 4.6.0 with object storage
Please consult the following documents to check how to configure object storage for Priint:Suite:
- Installing MinIO service on Linux or Installing MinIO service on Windows
- Configuration of MinIO
- Migration of documents and document templates to object storage
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\Jackrabbitin 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
jkstop12in 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 containingkeystore.jks):This command will create a filekeytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12keystore.p12which 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
importstatements 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.xmlusing the taskgeneratePomFileForAllArtifactsPublication. (The resulting file isbuild/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.