Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following information applies to patches of the JOC Cockpit GUI. For patches of the JS7 - REST Web Service API (API Server) see JS7 - Patches for JOC Cockpit API Server.

Anchor
on_premises
on_premises
Apply Patch to JOC Cockpit On Premises

The JOC Cockpit GUI expects Java .jar libraries for patches to be extracted to its data directory in following location:

The first part of the path including the jetty_base is specified during installation and can point to a different location. The remaining webapps/joc/WEB-INF/classes part  part of the path will remain the same for all installations.

...

The following example makes use of a patch available from https://download.sos-berlin.com/patches/2.5.3-patch/patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jar. This patch does not impact a JOC Cockpit installation and is used for instructional purposes only - for details see JS-1984zip. Do not apply the patch from the example for any JOC Cockpit release different from 2.5.3, for details see JOC-1550.


Code Block
languagebash
titleExample how to apply a patch to JOC Cockpit for Unix
linenumberstrue
# navigate to the target directory for patches
cd /var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/WEB-INF/classes

# verify the directory by checking if this file is available
ls api-schema-version.json version.json

# optionally take a backup
# tar --exclude=./WEB-INF -cvzf /tmp/backup-joc-cockpit-$(date +"%Y%m%d-%H%M%S").tar.gz .

# remove existing files and directories
find . -maxdepth 1 -type f -delete && rm -d -r ./assets ./styles

# download the patch archive
curl https://download.sos-berlin.com/patches/2.5.3-patch/patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jartar.gz -O

# extract the patch archive (use "jar" or "unzip" command)
jar -xf
tar -xvzf patch-2022033120230612-JSJOC-1984-1550.2.25.3.jar-gui.tar.gz

# remove the patch archive
rm patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.tar.jargz
Code Block
languagebash
titleExample how to apply a patch to JOC Cockpit for Windows
linenumberstrue
@rem navigate to the target directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\jetty_base\webapps\joc\WEB-INF\classes

@rem verify the directory by checking if this file is available
dir api-schema-version.json version.json

@rem optionally take a backup
@rem set month=%date:~3,2%
@rem set day=%date:~0,2%
@rem set year=%date:~6,4%
@rem set hour=%time:~0,2%
@rem set minute=%time:~3,2%
@rem set second=%time:~6,2%
@rem echo %year%-%month%-%day%
@rem tar.exe --exclude .\WEB-INF -cf %TEMP%\backup-joc-cockpit-%year%%month%%day%-%hour%%minute%%second%.zip .

@rem remove existing files and directories
del /Q *.*
rmdir /Q /S .\assets
rmdir /Q /S .\styles

@rem download from URL https://download.sos-berlin.com/patches/2.5.3-patch/patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jarzip
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jarzip .

@rem extract the patch archive (use "jar" or "unzip" command)
jar
tar.exe -xf patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jarzip
 
@rem remove the patch archive
del patch-2022033120230612-JSJOC-1984-1550.2.25.3-gui.jarzip


This example uses the jar tar.exe command that is available starting from a Java JDK. Should a Java JDK not be in place then the unzip command can be used.

The resulting directory hierarchy with the com sub-directory being created from the extracted patch should look like this:

  • webapps/joc/WEB-INF/classes
    • com
      • sos
        • ...

Windows 10.

Note: The JOC Cockpit has to be restarted to apply patches.

...

Note: As an alternative for Windows you can download the .jar patch file to the target directory and use tools such as 7-Zip to extract the archive. Do not create a sub-folder from the archive name but extract directly to the directory hierarchy as indicated above.

...