Identity Portal javascript handler fails with "importPackage" is not defined error
book
Article ID: 74733
calendar_today
Updated On:
Products
CA Identity ManagerCA Identity GovernanceCA Identity Portal
Issue/Introduction
After upgrading Identity Portal a previously working javascript handler is failing with "ReferenceError: 'importPackage' is not defined in <eval>"
Environment
Identity Portal 14.x
Cause
This issue is not actually caused by Identity Portal, but rather by the JVM that the Identity Portal is running against. After 14.x, Portal is only supported on Java 1.8.x.
As of Java 1.8, the javascript scripting engine has changed from Rhino to Nashorn.
Resolution
To resolve this, you'll need to add this line to the beginning of your scripts for compatibility: