My Oracle Support Banner

Limitations in Using Variables in the PASS / PASSWORD Parameters of ODI 12c Tools when Exporting / Importing Between Environments (Doc ID 2470588.1)

Last updated on APRIL 21, 2021

Applies to:

Oracle Data Integrator - Version and later
Information in this document applies to any platform.


In an Oracle Data Integrator (ODI) 12c Package, the "-PASS" parameter for the OdiSQLUnload Utility takes the encoded value from a Variable previously defined in the Package.

For example:

OdiSqlUnload "-FILE=D:\Temp\file.txt" "-DRIVER=oracle.jdbc.OracleDriver" "-URL=<@=sURL@>" "-USER=<@=sUser@>" "-PASS=<@=vPass@>" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
select 1 from dual

  ... where vPass is an ODI Variable defined and initialized with a valid encoded value in the Target Command Code (Oracle Technology) of an ODI Procedure task, for example:

vPass = odiRef.getInfo("SRC_ENCODED_PASS");
sURL = "<%=odiRef.getInfo("SRC_JAVA_URL")%>";
sUser = "<%=odiRef.getInfo("SRC_USER_NAME")%>";

OdiSqlUnload "-FILE=D:\Temp\file.txt" "-DRIVER=oracle.jdbc.OracleDriver" "-URL=<@=sURL@>" "-USER=<@=sUser@>" "-PASS=#GLOBAL.vPWD" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
select 1 from dual

  ... where #GLOBAL.vPWD is a refresh Variable (GLOBAL) that selects the encoded password value from an Oracle column or it is an ODI Variable assigned with an encoded value.

When running the Package Scenario in the environment where it was created it is working correctly.

When exporting the Package Scenario - for Case 1 - with an export key, it generates an error indicating that it is expecting only a cipher password:

ODI-14147: An error occurred while migrating cipher text in object <OBJECT_NAME> - 'null' (with Internal ID: <ID_Number> | 1 | 2 and Global ID: <ID_Number>)
  Input length must be multiple of 16 when decrypting with padded cipher
     ODI cannot decrypt the password cipher text which was not encrypted previously by the current master repository cipher.

When exporting the Package Scenario - for Case 2 - with an export key, it will create the export file but in the target environment the execution fails with an error similar to the following:

com.sunopsis.core.SecurityAccessException: javax.crypto.BadPaddingException: Given final block not properly padded
   at com.sunopsis.dwg.DwgObject.snpsDecode(
   at com.sunopsis.dwg.DwgObject.snpsDecypher(
   at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(
   at oracle.odi.runtime.agent.execution.SessionTask.execIntegratedFunction(
   at oracle.odi.runtime.agent.execution.SessionTask.executeOdiCommand(
   at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(
   at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(
   at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(
   at oracle.odi.runtime.agent.execution.SessionTask.processTask(
   at oracle.odi.runtime.agent.execution.SessionTask.doExecuteTask(
   at oracle.odi.runtime.agent.execution.AbstractSessionTask.execute(
   at oracle.odi.runtime.agent.execution.SessionExecutor$SerialTrain.runTasks(
   at oracle.odi.runtime.agent.execution.SessionExecutor.executeSession(
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(
   at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doProcessStartAgentTask(
   at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.access$2700(
   at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(
   at oracle.odi.runtime.agent.processor.task.AgentTask.execute(
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
   at com.sun.crypto.provider.CipherCore.doFinal(
   at com.sun.crypto.provider.CipherCore.doFinal(
   at com.sun.crypto.provider.AESCipher.engineDoFinal(
   at javax.crypto.Cipher.doFinal(
   at com.sunopsis.dwg.DwgObject.snpsDecode(
... 22 more

Note: The above cases have been found to apply to other ODI tools like OdiFtpPut.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 Solution 1. Use the ODI substitution method directly in the PASS / PASSWORD field
 Solution 2. Construct an ODI Variable that will take the encoded content from a file

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.