Solutions

ssoadm command fails to run with null pointer exception in AM 5 and 5.1.x

Last updated Jul 9, 2018

The purpose of this article is to provide assistance if you encounter an "Exception in thread "main" java.lang.NullPointerException" at com.sun.identity.tools.bundles.VersionCheck.isVersionValid(VersionCheck.java:73) when running an ssoadm command in AM 5 or 5.1.x after importing and exporting a service configuration using Amster.


1 reader recommends this article

Symptoms

The following error is shown when running a ssoadm command:

Exception in thread "main" java.lang.NullPointerException
 at com.sun.identity.tools.bundles.VersionCheck.isVersionValid(VersionCheck.java:73)
 at com.sun.identity.cli.CommandManager.main(CommandManager.java:145)

If you try to reinstall the ssoadm tools after receiving this error, you will see a message similar to the following after running the setup command (although the tools will install successfully):

The version of this tools.zip is: OpenAM 14.0.0
The version of your server instance is: null

Recent Changes

Exported and then imported a service configuration using Amster.

Causes

The com.iplanet.am.version property value is missing from the Amster export, which causes ssoadm to fail.

Note

The com.iplanet.am.version property is also used to determine when the upgrade process should be started; future upgrades will fail if this property is missing or set incorrectly.

Solution

This issue can be resolved by upgrading to AM 5.5 or later; you can download this from BackStage.

Workaround

You can workaround this issue using either of the following approaches:

  • Add the missing property in the console.
  • Add the missing property to the Amster export and re-import.

Add the missing property in the console

You can add the missing property in the console as follows:

  1. Navigate to: Configure > Server Defaults > Advanced and add the com.iplanet.am.version property and appropriate value, depending on which version of AM you are using:
    AM version Valid com.iplanet.am.version values
    AM 5.1.1 OpenAM 14.1.1 Build 2de1c7b98b (2017-August-09 12:33)
    AM 5.1 OpenAM 14.1.0 Build 0d174ec57d (2017-June-06 09:33)
    AM 5 OpenAM 14.0.0 Build 2db9af6287 (2017-March-29 05:21)
    For example, if you are using AM 5.1, you would add the following:
    com.iplanet.am.version = OpenAM 14.1.0 Build 0d174ec57d (2017-June-06 09:33)
  2. Click + to add followed by Save Changes.

Add the missing property to the Amster export and re-import

You can add the missing property to the Amster export as follows:

  1. Add the com.iplanet.am.version property and appropriate value (per the table above depending on which version of AM you are using) to the data section in the DefaultAdvancedProperties.json file (located in the /path/to/amster/export_dir/global directory). For example, if you are using AM 5, you would add:
    "com.iplanet.am.version" : "OpenAM 14.0.0 Build 2db9af6287 (2017-March-29 05:21)",
    
  2. Re-import the service configuration using Amster.

See Also

FAQ: Installing and using ssoadm in AM/OpenAM

Using ssoadm in AM/OpenAM

Using Amster in AM

Related Training

N/A

Related Issue Tracker IDs

OPENAM-11307 (Amster export should include the com.iplanet.am.version property)

OPENAM-11159 (OpenAM Amster export/import for Site have import errors)



Copyright and TrademarksCopyright © 2018 ForgeRock, all rights reserved.
Loading...