IBM Support

Why does the WebSphere utility for the Admin Console: iscdeploy.sh -restore fail with a NPE ?

Question & Answer


Question

The WebSphere <WAS_HOME>/bin/iscdeploy.sh -restore script for the Admin Console isclite application fails to execute, with the following NPE error stack:
[02/26/2024 13:14:26] PLPR0011I: 108 plugin(s) to reload [02/26/2024 13:14:26] PLPR0012I: Restoring plugin com.ibm.ws.console.core java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:280) Caused by: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1294) at java.util.regex.Matcher.reset(Matcher.java:320) at java.util.regex.Matcher.<init>(Matcher.java:240) at java.util.regex.Pattern.matcher(Pattern.java:1104) at com.ibm.ws.profile.bootstrap.WSProfileProperties.getProperty(WSProfileProperties.java:68) at com.ibm.wsspi.profile.WSProfile.getRegistryFile(WSProfile.java:3245) at com.ibm.wsspi.profile.WSProfile.getRegistryFile(WSProfile.java:3224) at com.ibm.wsspi.profile.WSProfile.listProfileNames(WSProfile.java:2565) at com.ibm.ws.console.plugin.PluginProcessor.getProfiles(PluginProcessor.java:2625) at com.ibm.ws.console.plugin.PluginProcessor.removeMetaDataFromProfiles(PluginProcessor.java:2286) at com.ibm.ws.console.plugin.PluginProcessor.reinstallModuleExtension(PluginProcessor.java:611) at com.ibm.ws.console.plugin.PluginProcessor.restore(PluginProcessor.java:469) at com.ibm.ws.console.plugin.PluginProcessor.main(PluginProcessor.java:1634)
___

Cause

The failure was caused by the following line in the customer's <WAS_HOME>/properties/wasprofile.properties file being commented out, so that WAS is unable to find the profileRegistry.xml file.
WS_PROFILE_REGISTRY=${was.install.root}/properties/profileRegistry.xml

Answer

Line 26 of the wasprofile.properties file has WS_PROFILE_REGISTRY property commented out, as follows:

#WS_PROFILE_REGISTRY=${was.install.root}/properties/profileRegistry.xml

Having the WS_PROFILE_REGISTRY property commented out will result in WAS not knowing the location of profileRegistry.xml file.

The solution was to remove "#" so that WS_PROFILE_REGISTRY can be included as a property, as follows:

WS_PROFILE_REGISTRY=${was.install.root}/properties/profileRegistry.xml

The WebSphere ./manageprofiles.sh -listProfiles command executed from <WAS_HOME>/bin also failed to list the WebSphere profiles.

Once corrected, customer executed manageprofiles.sh -listProfiles command to verify that the WebSphere profile information can be obtained, which ran successfully.

If there is an issue such as corruption of the profileRegistry.xml file (being zero byte, for example), the iscdeploy -restore operation will fail. Check the integrity of the profileRegistry.xml file by running the manageprofiles -listProfiles command. 

[{"Type":"MASTER","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"ARM Category":[{"code":"a8m50000000CdPnAAK","label":"WebSphere Application Server traditional-All Platforms-\u003ESystem Management-\u003ETraditional WAS-\u003EAdmin Console"}],"ARM Case Number":"TS015553437","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
22 March 2024

UID

ibm17145004