4 Replies Latest reply on Jul 14, 2019 1:15 PM by Mark.Thompson

    Shell script failing to run in ODI 12.2.1 on Linux

    Mark.Thompson

      I have created a simple one-line shell script named /u01/k_files/delete_csv_files.sh that contains this single line: rm /u01/k_files/odi_*.csv

       

      The script runs perfectly from a Linux command window.

       

      I have created a package with single step, which is an ODIOScommand tool that calls the shell script. 

       

      I am getting this error:

      oracle.odi.oditools.OdiToolInvalidParameterException: ODI-30151: Error while setting parameters on tool: OdiOSCommand /u01/k_files/delete_csv_files.sh

          at com.sunopsis.dwg.function.SnpsFunctionBase.setCoreOdiAPIParameters(SnpsFunctionBase.java:651)

          at com.sunopsis.dwg.function.SnpsFunctionBase.getCoreOdiTool(SnpsFunctionBase.java:567)

          at com.sunopsis.dwg.function.SnpsFunctionBase.getSunopsisApi(SnpsFunctionBase.java:538)

          at oracle.odi.runtime.agent.execution.SessionTask.executeOdiCommand(SessionTask.java:507)

          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:216)

          at oracle.odi.runtime.agent.execution.SessionTask.doExecuteTask(SessionTask.java:127)

          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.StartSessRequestProcessor.access$1400(StartSessRequestProcessor.java:74)

          at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:702)

          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: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-30044: Invalid parameter

          at com.sunopsis.dwg.function.SnpsFunctionBase.setCoreOdiAPIParameters(SnpsFunctionBase.java:644)

          ... 20 more

       

      It does not appear to me that ODI is even looking to see if the shell script exists, because if I specify the name of a shell script that does not exist, I get the same error.

       

      For the ODIOSCommand, I have tried:

      OdiOSCommand './u01/k_files/delete_csv_files.sh'

      OdiOSCommand ./u01/k_files/delete_csv_files.sh

      OdiOSCommand '/u01/k_files/delete_csv_files.sh'

      OdiOSCommand /u01/k_files/delete_csv_files.sh

      OdiOSCommand 'sh /u01/k_files/delete_csv_files.sh'

      OdiOSCommand sh /u01/k_files/delete_csv_files.sh

       

      What am I doing wrong?