Problem With UNIX command in ODI Environment.
706375Oct 8 2009 — edited Oct 22 2009A procedure is used in our package which involves moving a file from a folder to another in a UNIX server.
The procedure uses an OS command - 'os.system' to execute unix command.
The unix command is a grep command which seems to work fine when executed alone.
But when this procedure is executed ,it fails.
The following code raises an error and the procedure fails.:
if os.system(cmd) <> 0:
raise "command fails","see agent output for details";
Whenever we are trying to reverse,we get "file not Found " error.
We tried to execute the jython code by placing the files in local directories. The same error appears both when the file is in local and when it is in a remote directory.
This is the error we get:
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 20, in ?
HeaderCmd failed:: See agent output for details at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java) at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java) at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)