IBM Support

Attempt to run the managesdk command results in error: _setupsdk1.8_64.sh: not found

Question & Answer


Question

Why does the managesdk command fail with the following error ?
Example:
<WAS_HOME>/bin/managesdk.sh -listAvailable
     /<WAS_HOME>/bin/managesdk.sh: <WAS_HOME>/bin/sdk/_setupsdk1.8_64.sh: not found
This happens with any parameter passed to the managesdk command.
I have found the error occurs with other commands as well.
For example, it also occurs when running the collector.sh command.
<WAS_HOME>/bin/collector.sh
     /<WAS_HOME>/bin/collector.sh: /<WAS_HOME>/bin/sdk/_setupsdk1.8_64.sh: not found
A listing of the /<WAS_HOME>/bin/sdk directory shows the _setupsdk1.8_64.sh file *DOES NOT* actually exist.
So why is the managesdk command expecting to find that file ?

/<WAS_HOME>/bin/sdk#‌ ls -laF
   drwxr-xr-x  2 wsadmin wsadmin       7 Jan 10 11:55 ./
   drwxr-xr-x  9 wsadmin wsadmin     257 Jan 10 11:56 ../
   -rwxr-xr-x  1 wsadmin wsadmin    1144 Jan 10 11:32 _setupSdk.sh*
   -rwxr-xr-x  1 wsadmin wsadmin     106 Jan 28 2019 _setupsdk1.7_64.sh*
   -rwxr-xr-x  1 wsadmin wsadmin      99 Jul 31 2019 _setupsdk1.8_64_bundled.sh*
   -rwxr-xr-x  1 wsadmin wsadmin    3018 Jan 22 2019 setupProfileSDK.sh*

 

Cause

When updating to the 8.5.5.14 or later FixPack from a previous version, the bundled Java 1.6 SDK is removed and replaced with the bundled (embedded) version of Java 1.8.
Since the error indicates the managesdk command is looking for _setupsdk1.8_64.sh instead of the _setupsdk1.8_64_bundled.sh, this indicates the optional Java 1.8 SDK was once installed but has since been uninstalled since it is not found under the <WAS_HOME>/bin/sdk location.
It appears the CommandDefault and ProfileDefault properties were still set to the optional Java 1.8 SDK when it was uninstalled.
When this is the case, the cmdDefaultSDK.properties and newProfileDefaultSDK.properties files under <WAS_HOME>/properties/sdk will not be updated with 1.8_64_bundled property and will continue to have the (now uninstalled) 1.8_64 property set.  Which results in the "_setupsdk1.8_64.sh: not found" error.

Answer

To resolve the problem you will need to update the cmdDefaultSDK.properties and newProfileDefaultSDK.properties files which are found in the following locations:
<WAS_HOME>/properties/sdk/cmdDefaultSDK.properties
<WAS_HOME>/properties/sdk/newProfileDefaultSDK.properties
Make a backup of these files.
Then edit the files and change the property to equal 1.8_64_bundled instead of 1.8_64.
In <WAS_HOME>/properties/sdk/cmdDefaultSDK.properties
    change
COMMAND_DEFAULT_SDK=1.8_64
    to
COMMAND_DEFAULT_SDK=1.8_64_bundled
In <WAS_HOME>/properties/sdk/newProfileDefaultSDK.properties
    change
com.ibm.websphere.sdkname.newProfileDefaultSDK=1.8_64
    to
com.ibm.websphere.sdkname.newProfileDefaultSDK=1.8_64_bundled
Moving forward, when using the managesdk command to change the Java SDK being used by the WebSphere Application Server profiles, make sure you issue the following commands:
For example:
<WAS_HOME>/bin/managesdk.sh(bat) -enableProfile -profileName AppSrv01 -sdkname 1.8_64_bundled -enableServers
<WAS_HOME>/bin/managesdk.sh(bat) -setCommandDefault -sdkname 1.8_64_bundled
<WAS_HOME>/bin/managesdk.sh(bat) -setNewProfileDefault -sdkname 1.8_64_bundled
Doing so will enable the Java version you want and will also update the properties files with this Java version.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF051","label":"Linux on IBM Z Systems"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5.5.x","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 April 2020

UID

ibm15692844