Page History
...
- Bugs, vulnerabilities and patches are communicated with the SOS Change Management System.
- This article provides information about how to apply patches to the JOC Cockpit.
Display feature availability StartingFromRelease 2.3.0 - For automated patching see JS7 - Automated Installation and Update.
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 | ||||
---|---|---|---|---|
|
The JOC Cockpit GUI expects Java .jar libraries for patches to be extracted to its data directory in following location:
- Unix
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc
/var/sos-berlin.com/js7/joc/jetty_base/webapps/joc/assets
/var/WEB-INF/classes
sos-berlin.com/js7/joc/jetty_base/webapps/joc/styles
- Windows
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc\WEB-INF\classes\assets
C:\ProgramData\sos-berlin.com\js7\joc\jetty_base\webapps\joc\styles
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
# 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
@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.
...