A client recently encountered a problem when attempting to start a newly-installed Integration Agent. When the Integration Agent failed to start, the client checked the log files and found the following error message:
ERROR - The script for Integration Service (applications,bmcbppm30) could not be created due to an exception.
com.alarmpoint.integrationagent.exceptions.ScriptCreationException: The script for Integration Service
(applications,bmcbppm30) could not be created due to an exception.
This issue occurred because the Integration Agent version 5.1.8 uses Java 1.8, which offers new functionality, and includes a class called Base64. Previous Integration Agents used earlier versions of Java which did not include this class, and therefore had to explicitly import Base64 from another source.
In Integration Agent 5.1.8, the explicit "import" instruction fails because the class already exists, and this prevents the Integration Agent from starting up.
This problem is most likely to occur after upgrading an existing Integration Agent to version 5.1.8, or when installing a new integration using Integration Agent 5.1.8.
If you encounter this issue, use the following steps to resolve it and start your Integration Agent:
- Locate the Base64 error message in your Integration Agent log and note the name of the file that is causing the exception.
- In the error message above, the line number is appended to the file name: wsutil.js#10
- For example, replace:
If Your Integration Script Requires Base64Encode
If your find that your integration script requires the Base64Encode function, you can use JRE 8's built-in Base64 functionality instead of the version imported from Apache. Recall that JRE 8 is included with IA 5.1.8 and later only.
Using the HP NNMi integration as an example, you can replace
this.authorization = this.base64Encode(NNMI_USER+":"+NNMI_PASSWORD);
var nnmiCred = NNMI_USER + ":" + NNMI_PASSWORD;
this.authorization = "" + java.util.Base64.getEncoder().encodeToString( new java.lang.String(nnmiCred).getBytes() );
xMatters internal reference: DOC-5878, SUP-14304