IBM Support

TBSM Migration from 6.1.1.5 to 6.2 fails with following error message "javax.script.ScriptException: TypeError: java.io.InputStreamReader is not a function"

Question & Answer


Question

While running TBSM_Dataserver_Import.sh script to Import the data from TBSM 6.1.1.5 into TBSM 6.2 the following error message is thrown:
.../migrate_props.xml:485: javax.script.ScriptException: TypeError: java.io.InputStreamReader is not a function in <eval> at line number 4

Answer

While checking what is running at the line referenced by the error message within migrate_props.xml you will find the following :
 fis = new java.io.FileInputStream(newNCHomeDir+java.io.File.separator+"etc"+java.io.File.separator+serverName+"_servicelist");
 freader = new java.io.BufferedReader(java.io.InputStreamReader(fis, "UTF-8"));
This works correctly with an Impact version based on Java 7 but it won't work with newer versions that are based on Java 8.
An APAR has been raised to address this issue:
APAR IJ19803 - TBSM 6.2 Migration fails with TypeError: java.io.InputStreamReader is not a function in eval
As a workaround to have this problem solved and be able to migrate try the following steps:
  • take a backup of migrate_props.xml file
  • replace all the occurrences of the following line:
 freader = new java.io.BufferedReader(java.io.InputStreamReader(fis, "UTF-8"));
with these 2:
reader=new java.io.InputStreamReader(fis, "UTF-8");
freader = new java.io.BufferedReader(reader);
  • save the migrate_props.xml file and try the migration again

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSSPFK","label":"Tivoli Business Service Manager"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"6.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

TBSM

Document Information

Modified date:
23 October 2019

UID

ibm11097655