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 JUNE 05, 2020

Applies to:

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

Symptoms

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(DwgObject.java:5079)
   at com.sunopsis.dwg.DwgObject.snpsDecypher(DwgObject.java:5057)
   at com.sunopsis.dwg.tools.SqlUnload.actionExecute(SqlUnload.java:322)
   at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java:235)
   at oracle.odi.runtime.agent.execution.SessionTask.execIntegratedFunction(SessionTask.java:918)
   at oracle.odi.runtime.agent.execution.SessionTask.executeOdiCommand(SessionTask.java:599)
   at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:32)
   at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:18)
   at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:52)
   at oracle.odi.runtime.agent.execution.SessionTask.processTask(SessionTask.java:208)
   at oracle.odi.runtime.agent.execution.SessionTask.doExecuteTask(SessionTask.java:119)
   at oracle.odi.runtime.agent.execution.AbstractSessionTask.execute(AbstractSessionTask.java:886)
   at oracle.odi.runtime.agent.execution.SessionExecutor$SerialTrain.runTasks(SessionExecutor.java:2225)
   at oracle.odi.runtime.agent.execution.SessionExecutor.executeSession(SessionExecutor.java:610)
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(TaskExecutorAgentRequestProcessor.java:718)
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(TaskExecutorAgentRequestProcessor.java:611)
   at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)
   at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doProcessStartAgentTask(TaskExecutorAgentRequestProcessor.java:800)
   at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.access$2700(StartScenRequestProcessor.java:85)
   at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:917)
   at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:180)
   at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:108)
   at java.lang.Thread.run(Thread.java:748)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
   at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989)
   at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:845)
   at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
   at javax.crypto.Cipher.doFinal(Cipher.java:2165)
   at oracle.odi.core.security.cryptography.aes.AESCipher.decryptKey(AESCipher.java:267)
   at oracle.odi.core.security.cryptography.aes.AESCipher.decryptPassword(AESCipher.java:447)
   at com.sunopsis.dwg.DwgObject.snpsDecode(DwgObject.java:5076)
... 22 more

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

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
 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
References


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