This page provides instructions for upgrading a FlexDeploy installation. These instructions may upgrade Tomcat to the version included in the distribution zip depending on current version of FlexDeploy. FlexDeploy packages Tomcat version 9.0.54.

Note that FlexDeploy requires Java 8 for Tomcat, if you are upgrading from older version you may have to upgrade Java as well.

It was also noticed that <JarScanner scanManifest="false"/> was missing in some older context.xml files, which caused java.io.FileNotFoundException: /opt/flexagon/tomcat/apache-tomcat-flexdeploy/lib/gdk_custom.jar (No such file or directory).

Make sure you have downloaded new version of FlexDeploy and unzipped it, so it can be accessed during upgrade process.

Upgrade Instructions

Step 1. Stop the Tomcat server. Use shutdown.sh on Linux and shutdown.bat on Windows.


Step 2. Backup the FlexDeploy schemas, Artifact Repository and apache-tomcat-flexdeploy folder. In case you need to back out FlexDeploy, you can use this backup data.

For back-out purposes, it is highly recommended that a database backup of the database be taken using standard tools like RMAN for Oracle. Another option would be to export the FD, FD_ADMIN, and FF schemas using data pump. The schemas can be exported using the following data pump command for Oracle as shown below. Follow standard procedures for PostgreSQL for database backup.

You will need to setup environment variables before running expdp. For example,

export ORACLE_HOME=/u01/app/oracle/product/
12.1.0/dbhome_1
export ORACLE_SID=fd01

export statements above are for example only as values will be different for your installation.

expdp system directory=DATA_PUMP_DIR dumpfile=fd_bkup.dmp schemas=FD,FF,FD_ADMIN

If this database is exclusively used for just FlexDeploy application, you can rely on Database backup and recovery processes (RMAN)
instead of export data procedure.

It is recommended that a backup of the artifact repository file system be taken in case a back-out is required. The location of the artifact repository can be identified by looking at value of -Dflexagon.fd.repository.root in setenvoverride.sh/setenv.sh or setenvoverride.bat/setenv.bat file. This file will be in <FlexDeploy Home>/apache-tomcat-flexdeploy/bin/. Standard file backup procedures can be followed. See following example for unix only, which can be used to create a tar file backup of the entire directory.

cd <artifact repository location>
tar –cvzf artifact.tar.gz <artifact repository location>

Step 3. Upgrade the FlexDeploy schemas


Step 4. Take a backup and delete apache-tomcat-flexdeploy folder (this will be replaced by new copy). It is required to take backup since the old configuration files will need to be referenced. See example below for Linux. This folder was updated as part of 5.6.0.4, but you can follow this process for every upgrade.

# Assuming FLEXDEPLOY_HOME environment variable is set, it should be parent folder of apache-tomcat-flexdeploy
# export FLEXDEPLOY_HOME=/u01/flexdeploy
cd $FLEXDEPLOY_HOME
# change version in backup folder as per version you are upgrading from
mv apache-tomcat-flexdeploy/ apache-tomcat-flexdeploy-5603/

Step 5. Copy apache-tomcat-flexdeploy folder from distribution zip.

# let's say download zip was extracted in /u01/software/flexdeploy
# export UNZIPPED_FLEXDEPLOY=/u01/software/flexdeploy
cd $FLEXDEPLOY_HOME
mkdir apache-tomcat-flexdeploy
# assuming download zip has been unzipped in UNZIPPED_FLEXDEPLOY folder. 
cd $UNZIPPED_FLEXDEPLOY/apache-tomcat-flexdeploy
cp -R * $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/
cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/
chmod +x ./bin/*.sh
cp $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy-5603/libext/* $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/libext/

Note on additional extension jar files : If you had placed additional libraries in apache-tomcat-flexdeploy/lib folder or in the apache-tomcat-flexdeploy/libext folder, then you will need to copy them from backup folder into the new apache-tomcat-flexdeploy/libext folder. Note that all extension jars should be kept in libext folder. Examples might be JDBC driver (for Oracle drivers there is additional detail in step 6), CyberArk libraries for Tomcat connection pool provider etc.


Step 6. Copy the context.xml file from the backup folder into <FlexDeploy Home>/apache-tomcat-flexdeploy/conf.

cd $FLEXDEPLOY_HOME/apache-tomcat-flexdeploy-5603/conf/
cp context.xml ../../apache-tomcat-flexdeploy/conf/

If using Oracle database,


Step 7. Edit the <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/server.xml and modify the HTTP/HTTPS ports to match that of the original file which was backed up in step 4. If you had setup keystore details, copy that as well from backup file. DO NOT simply copy over the backup file as there may be other changes.


Step 8. Starting with FlexDeploy 5.6.0.1 changes will no longer be made in setenv.sh (or .bat).

If you were already using setenvoverride.sh, then copy that from backup folder (Step 4), otherwise any changes previously done for setenv.sh must be added to setenvoverride.sh (or .bat). For example, Artifact directory, application directory, and java_home changes will need to be transferred over from your old setenv.sh file. If your old file looks like this:

Your new setenvoverride.sh should look like this:


Step 9. Copy plugins from download zip for auto upload.


Step 10 . Start tomcat by running the following script

<FlexDeploy Home>/apache-tomcat-flexdeploy/bin/startup.sh (startup.bat on Windows)


Step 11. Launch FlexDeploy in your browser - http://<hostname>:<port>/flexdeploy


Step 12. There is no need to activate plugins manually. FlexDeploy will automatically upload and activate new versions of plugins once they are copied to plugins folder. You will notice that plugins that you copied in Step 8 will eventually be uploaded automatically and folder will not have any jar files left. You can also look at Administration - Plugins in UI and see newer versions of plugins.