Error while executing UNIX script from BODS - exit code 127

I am trying to execute a unix script by calling it in BODS job. It is giving an error saying Program terminated with exit code 127. The same script when i am executing in UNIX it is working fine. I am unable to trace the issue.

Hi Sabre,
As per the guidelines provided by the article, i had done below changes..
InputStream is = null;
InputStreamReader iStreamReader = null;
BufferedReader bReader = null;
String line = null;
try{
String fileName ="test.ksh";
String argValue ="satish"; // value passed to the script
String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
Process proc = Runtime.getRuntime().exec(exeParam);
is = proc.getErrorStream();
iStreamReader = new InputStreamReader(is);
bReader = new BufferedReader(iStreamReader);
System.out.println("<ERROR>");
while((line = bReader.readLine()) != null)
System.out.println("Error is : "+line);
System.out.println("</ERROR>");
int exitValue = proc.waitFor();
sop("Exit Value is : "+exitValue);
catch(Exception e)
e.printStackTrace();
Now , it's showing something like..
<ERROR>
</ERROR>

Similar Messages

  • Error while executing the script adgetlnxver.sh

    Error while executing the script adgetlnxver.sh on apps&db tier during upgrade from 11.5.9 to 11.5.10.2
    -bash: [: -lt: unary operator expected
    [aptinst@dba5 TINST_dba5]$ sh adapcctl.sh restart
    adapcctl.sh version 115.55
    /u01/app/tinst/tinstappl/ad/11.5.0/bin/adgetlnxver.sh: line 123: [: -lt: unary operator expected
    Apache Web Server Listener :httpd ( pid 8645 ) is running.
    Restarting the Apache Web Server Dedicated HTTP Listener..
    Apache Web Server Listener (PLSQL) :httpd ( pid 8673 ) is running.
    Restarting the Apache Web Server Dedicated PLSQL Listener..
    adapcctl.sh: exiting with status 0
    In adgetlnxver.sh: line 123 says
    if [ ${setflag}x = "x" -a $os = "RH" ]; then
    redhatver=`grep -oP "Enterprise Linux [a-z A-Z 0-9]* release [0-9]+" /etc/redhat-release | sed 's/Enterprise Linux [a-z A-Z 0-9]* release //g'`
    if [ $redhatver -lt 5 ]; then
    LD_ASSUME_KERNEL="2.4.19"
    export LD_ASSUME_KERNEL
    fi
    fi
    Thanks,
    Vamsi

    Hi Vamsi.
    The exactly erro refers to a problems when you try upgrade from these version to 11.5.10.
    Can you read this note and apply solution? The note refers a patch, but the problem is the same.
    After Patch 4334965, adstrtal.sh & adstpall.sh is failing with errors [ID 360046.1]
    BR Rafael Ceolim

  • Javascript Error while executing BEx querry from browser

    Hi Folks
    We have been getting a number of Javascript errors while executing BEx querries from the browser.
    The various errors that we have been getting are:
    'SAPBWItemCatalog' is undefined
    'SAPBWJSgdo' is null or not an object
    'SAPBWShortCutCatalog' is undefined
    We have already looked at SAP Note 783496 and validated the solution.
    Is there some specific settings that needs to be maintained for this?

    Hi Sandip,
    Just spent 2 hours chasing this one so I know how frustrating it is.
    Solution:-
    Check mime service in SICF - dafault_host/sap/bw/mime - if it's greyed out activate it.
    Regards
    Nev

  • ORA-27092 Error while executing any query from client

    Hello
    I am getting following error while executing any query from client remotly.
    IAMDBA@TEST_OAT.ABCD > select userid from dual;
    select userid from dual
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01116: error in opening database file 1
    ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
    ORA-27092: size of file exceeds file size limit of the process
    Additional information: 131071
    Additional information: 286209
    But while local connection,its working.

    hi,
    ulimit command- Limit user resources
    su - oracle
    ulimit -n (this command will show you the current value for ulimit the default value is 1024)
    to increase its value:---
    ulimit -n <some value> ( this command will change value for current session only)
    example
    ulimit -n 101062
    once done check the value as:--
    ulimit -n( for verification)
    search in google for more explanation or revert back to me for any suggestions.... :)
    Edited by: varun4dba on Jan 31, 2011 4:09 PM

  • Getting Error while Execute SSIS Package from Console Application

    Dear All,
    SSIS package working fine directly.
    I got following error while execute SSIS package from C# console application.
    The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
    in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
    OLE DB Destination failed validation and returned error code 0xC004800B.
    One or more component failed validation.
    There were errors during task validation.
    Code : 
       public static string RunDTSPackage()
                Package pkg;
                Application app;
                DTSExecResult pkgResults;
                Variables vars;
                app = new Application();
                pkg = app.LoadPackage(@"D:\WORK\Package.dtsx", null);
         Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = pkg.Execute();
    I have recreate the application with again new connection in SSIS.
    Still not working, Please provide solution if any one have.
    DB : SQL Server 2008 R2
    Thanks and regards,
    Hardik Ramwani

    The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
    in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
    Are you sure that you are running the same package via .NET which works fine from Visual Studio?
    By reading error message, I can say that you have copied OLEDB task from another package OR you have deleted one OLEDB connection manager. Now when package is run this task tries to use the connection manager and not found thus throws error message.
    Open all OLEDB destination tasks and you find connection manager missing. Connection Manager name should be provided there
    Cheers,
    Vaibhav Chaudhari
    MCSA - SQL Server 2012

  • How execute Unix script from java?

    Can I execute Unix script from java?

    Yes. Using ProcessBuilder. And read [When Runtime.exec() wont|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]. It's old, but pretty much all of it is still true.

  • Problem executing Unix script from Java...

    Hi there, I'm having trouble executing a unix script from a java program. The script receives multiple parameters and it seems that one of them ( or more ) is not well interpreted. When I run the script directly from a shell, the script executes without any errors. But, when I run the exact same script with the exact same parameters, it does not work.
    Here is the command to execute the script with all the parameters that is executed from the shell ( with success ) and also from the java program ( with errors ):
    /z/opus/dcap/intfu001.csh 'NODEBUG^NOTKPROF^NOSTACK' opus dcap JACQUES JACQUES '2625781' 'ORA$PIPE$001D00D70001' JOB^DEBUG^SINISIMU^STATPROD^DECTIDANC^81^503^4080^86^87^151^97^98^99 BUT^N^N^SPRI^0^13^24^3^J^05^N^19^19^19 >> /tmp/switcher8.999.null.pgm.test
    And here is my portion of code that executes the script:
    Runtime wShell = Runtime.getRuntime();
    Process wProc = wShell.exec(cmd_unix_final);
    wProc.waitFor();
    return wProc.exitValue();
    Please give me your thoughts on this!
    Thanks in advance!

    Ok.
    Let's proceed surgically, else we'll never solve or overcome anything.
    In the last your reply you wrote:
    the normal output is what I get when the script runs successfully, the script first prints a few things
    and then does stuff that takes at least 2 or 3 secondsWhat do you mean?
    -Finally have you got your script correctly executed?
    The stuffs you spoke of are really performed?
    If this is the case I can't see the prob.
    Is your concern only about exitValue() for it doesn't let you distinguish programmatically
    the success or failure of the script execution?
    Of course you surely already have a routine in your java code to handle
    exceptional situations of errors from the script.
    And the "normal output" is just what you must parse to detect those errors.
    Then who cares about exitValue() in this case?
    Don't invoke it, relay on the stdout and stderr of the script.
    -Or you get only a deceiving standard output
    that let you think the script execution went alright, while instead it didn't.
    In this case we have to investigate some other thing.
    I can't still exclude that the problem isn't related with the buffer size of the stdout
    allocated by the environment to the subprocess. You spoke of few things printed out.
    Be explicit. What's the size of the output you get?
    And is the "normal output" complete till the very last char
    or is it truncated from somewhere on?
    Also it's important that you hit a ps command after the java main process terminates
    (or simply when waitFor() returns) and see if the script subprocess hung up.
    As an alternative approach directly call your pro*C code from Java through JNI, instead of translating it.
    1. Exec.java
    public class Exec{
         static{
              System.loadLibrary("Exec");
         public static native void proCFunct();
         public static void main( String[] args){
              proCFunct();
    }2. javac Exec.java
    3. javah Exec
    4.Exec.c
    #include "Exec.h"
    JNIEXPORT void JNICALL Java_Exec_proCFunct(JNIEnv * a, jclass b){
         //here call the function that executes the script
    5. cc -G -I$JAVA_HOME/include -I$JAVA_HOME/include/solaris -I$YOUR_INCLUDES Exec.c -o libExec.so
    6. setenv LD_LIBRARY_PATH .
    7. java Exec

  • Executing Unix scripts from a stored procedure

    From the sql*plus windows, I am able to execute the host command and '!sh' commands; but I need to ececute Unix scripts from a stored procedure. Hoe can I do this? Where can I get good documentation on this? Any help would be greatly appreciated!
    Thanks..

    Hi,
    U can use external procedure ( newly added feature in 8.0.3 onwards) and call any shared library. From shared library u can execute it.
    One sql command is there HOST(' '). U can run a OS command. But u can not use it in PL/SQL.
    U can call pls sql from shell !!!!!..
    Thanks...
    Boby Jose

  • Execute UNIX  script from java not working

    Hi
    I am having difficulty running my java program to execute UNIX script on a Windows box. Here is my code.
    public boolean executeScript() {
              try {
                   String testScript= "WEB-INF/scripts/test.sh";
                   File file = new File(copyToQaScript);
                   System.out.println(file.getAbsolutePath());
                   Process proc = Runtime.getRuntime().exec(file.getAbsolutePath());
              } catch (IOException ioe) {
                   ioe.printStackTrace();
                   logger.error(ioe);
              } catch (RuntimeException re) {
                   re.printStackTrace();
                   logger.error(re);
              } catch (Exception e) {
                   e.printStackTrace();
                   logger.error(e);
              return true;
         }When I execute this method, I am getting IOException as below.
    java.io.IOException: CreateProcess: C:\tomcat-5.0.28\webapps\myProject\WEB-INF\scripts\test.sh error=193
    Can anyone help me? Thanks.

    kminkeller wrote:
    Yes I have Cygwin installed. I am quite aware of that thanks Sabre.Then you need something like
          String[] command = {"bash","/home/sabre/bin/fred.sh"};
            Process p = Runtime.getRuntime().exec(command);
      if the executabe directory (/home/sabre/bin in my case) is not on the PATH or
          String[] command = {"bash","fred.sh"};
            Process p = Runtime.getRuntime().exec(command);
      if it is.

  • Time out error while executing BW query from SRST

    Hello Experts,
    While running a query from SRST t-code im getting time out dump.
    Is there any possibility to run the query in background to avoid dumps, apart from taking the report and executing from SE 38
    Regards,
    Arjun Reddy.

    Hi,
    Your target may have huge and report may be trying to extract whole data.
    please try to your report with some selections/filters and check it.
    it may work.
    Thanks

  • Error while executing unix shell script from java program

    Hi All,
    I am trying to execute unix shell script from a java program using Runtime.execute() method by passing script name and additional arguments.
    Code snippet :
    Java Class :
    try{
         String fileName ="test.ksh";
         String argValue ="satish"; // value passed to the script
         String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
         Process proc = Runtime.getRuntime().exec(exeParam);
         int exitValue = proc.waitFor();
         sop("Exit Value  is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    }Test.ksh
      export -- application realated paths..
      nohup  abc.exe 1> test.log 2>&1;
      $1
      exit.By running the above java class , i am getting exit Value: 139 and log file test.log of 0 bytes.
    when i am running the same command (/usr/bin/ksh test.ksh satish) manually, it's calling abc.exe file successfully
    and able generate the logs properly.
    Pls let us know where exactly i am stuck..
    Thanks in advance,
    Regards,
    Satish

    Hi Sabre,
    As per the guidelines provided by the article, i had done below changes..
    InputStream is = null;
    InputStreamReader iStreamReader = null;
    BufferedReader bReader = null;
    String line = null;
    try{
    String fileName ="test.ksh";
    String argValue ="satish"; // value passed to the script
    String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
    Process proc = Runtime.getRuntime().exec(exeParam);
    is = proc.getErrorStream();
    iStreamReader = new InputStreamReader(is);
    bReader = new BufferedReader(iStreamReader);
    System.out.println("<ERROR>");
    while((line = bReader.readLine()) != null)
    System.out.println("Error is : "+line);
    System.out.println("</ERROR>");
    int exitValue = proc.waitFor();
    sop("Exit Value is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    Now , it's showing something like..
    <ERROR>
    </ERROR>

  • Issue while executing OS script from Oracle

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    =============================================================
    Issue with Executing OS commands from Stored Procedure
    ============================================================

  • Execute unix script from abap.

    Hi friends,
    I have a abap report which generate  a text file in<b> /usr/tmp/</b>  directory . Now i have a unix script   which encript the text file.  I want to this from abap report. How I can do this . and in which path  I should keep this unix script   Please help.
    Regards

    Hi,
    try the below code
    parameters : p_sfile(60) lower case
    "File to be moved
    "Eg : /home/in/SFILE1.txt
    p_dfile(60) lower case.
    "File's Destination
    "Eg: /home/archive/SFILE1.txt
    data : t_btcxpm
    like btcxpm occurs 0,
    p_addparam
    like sxpgcolist-parameters.
    concatenate
    '/home/ABAP/scripts/Archive_file.sh'
    p_sfile
    p_dfile
    into p_addparam separated by space.
    refresh t_btcxpm. clear t_btcxpm.
    call function 'SXPG_CALL_SYSTEM'
    exporting
    commandname = 'ZSHELL'
    additional_parameters = p_addparam
    tables
    exec_protocol = t_btcxpm
    exceptions
    no_permission = 1
    command_not_found = 2
    parameters_too_long = 3
    security_risk = 4
    wrong_check_call_interface = 5
    program_start_error = 6
    program_termination_error = 7
    x_error = 8
    parameter_expected = 9
    too_many_parameters = 10
    illegal_command = 11
    others = 12.
    if sy-subrc = 0.
    write : /
    'File',p_sfile,'moved to',p_dfile.
    else.
    write : / 'Error Occured'.
    endif.
    Reward points if found helpful……
    Cheers,
    Chandra Sekhar.

  • Error while executing a scenario from CMD

    I am trying to execute a scenario from CMD using the starctscen command.
    when I use the below command
    E:\OraHome_ODI\oracledi\bin\startscen EXT_DATA 002 GLOBAL
    it is executing correctly
    but I tried to create a sceduler for the execution where i used the below command
    C:\Documents and Settings\Desktop>"E:\OraHome_ODI\oracledi\bin\startscen.bat" EXT_DATA 002 GLOBAL
    and it is giving me the following error
    The system cannot find the path specified.
    OracleDI: Starting scenario EXT_DATA 002 in context GLOBAL ...
    'oracle.odi.Agent' is not recognized as an internal or external command,
    operable program or batch file.
    can someone help me on this.
    Thanks,
    Sri

    In the batch File write this way
    cd E:\OraHome_ODI\oracledi\bin
    E:
    startscen EXT_DATA 002 GLOBAL In case you are providing the values (EXT_DATA 002 GLOBAL) as parameter
    then call the startscen this way
    cd E:\OraHome_ODI\oracledi\bin
    E:
    startscen %1 %2 %3

  • Error while executing a report from Planning

    Hi,
    I've got this error message when I execute a report from Hyperion Planning (web) :
    "5200: Error executing query. [1106] Error : Class component property name invalid[DataType]"
    Can you help me please ?
    Thanks.
    Virgile.

    I am not sure about it. But i remember once running into a similar issue where i made some changes in the metadata or outline and few members were dropped from the hierarchy and it came up with this error at the time of running
    the report as my report was still trying to query the dropped members. But u said you have already checked and all your members are valid on the report. Is this happening with all the reports or just one. If its all the reports i would
    restart the BI+ reporting services and then try to run the reports!

Maybe you are looking for