This discussion is archived
11 Replies Latest reply: Nov 20, 2013 11:42 PM by K37 RSS

Encountering : wferr: '.- 207: Could not open file

K37 Newbie
Currently Being Moderated

Hi All,

 

I am trying to run the below WFLOAD with the command from a shell script:

 

$FND_TOP/bin/WFLOAD apps/$APPS_P  0 Y UPGRADE $XXHR_TOP/workflow/xxhrggsvtsr.wft

 

and I end up getting the error below -

 

wferr:

'.- 207: Could not open file '/u5403/app/oa11dev4/custom/xhr/workflow/xhrcmgmt.wft

 

 

And I able to successfully run the same command from puTTy and it is all fine, but when I put this command inside a shell script and try to run, it fails.

Checked all permissions for the files and folder and also ran it as applmgr, but no use.

 

Thanks in advance.

  • 1. Re: Encountering : wferr: '.- 207: Could not open file
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Pl post the shell script. Why is there a difference in the wft file names ? xxhrggsvtsr.wft and xhrcmgmt.wft

     

    HTH
    Srini

  • 2. Re: Encountering : wferr: '.- 207: Could not open file
    K37 Newbie
    Currently Being Moderated

    Hi Srini,

     

    Sorry that was another one that I was trying to find some differences and posted that here instead.

     

    Please find the shell script below that is failing:

     

    #!/usr/bin/ksh

    #

    # Name: 2019.setup.wrapper

    #

    # Desc: Installs the common utility package and the

    #       the workflow used by the BPEL Flows

    #

    # Date: 30-NOV-2007  Developer: ERAST

    #

    echo "Start: 2019.setup.wrapper `date`"

     

    ####################

    # Grants To xhr from apps

    #

    sqlplus apps/$APPS_P <<!eof

    @$XHR_TOP/sql/xhr_run_1_grants_to_xhr_run_as_apps.sql;

    exit

    !eof

     

    ####################

    # Synonyms in xhr

    #

    sqlplus xhr/$XHR_P <<!eof

    @$XHR_TOP/sql/xhr_run_2_grants_syn_run_as_xhr.sql;

    exit

    !eof

     

    ####################

    # Compile Packages, Procedures, Triggers, Functions

    #

    sqlplus xhr/$XHR_P <<!eof

    @$XHR_TOP/sql/xhr_cm_util_pkg.sql;

    #@$XHR_TOP/sql/xhr_temp_message_tbl.sql

    RENAME XHR_TEMP_MESSAGE# TO XHR_TEMP_MESSAGE

    exit

    !eof

     

    ####################

    # Grants To APPS from XHR

    #

    sqlplus xhr/$XHR_P <<!eof

    GRANT EXECUTE  ON XHR_CM_util      TO APPS;

    GRANT ALL      ON xhr_temp_message TO APPS;

    GRANT ALL      ON XHR_TEMP_SEQ     TO APPS;

    exit

    !eof

     

    ####################

    # Synonyms in APPS

    #

    sqlplus apps/$APPS_P <<!eof

    CREATE SYNONYM XHR_CM_util      FOR xhr.XHR_CM_util;

    CREATE SYNONYM xhr_temp_message FOR xhr.xhr_temp_message;

    CREATE SYNONYM XHR_TEMP_SEQ     FOR xhr.XHR_TEMP_SEQ;

    exit

    !eof

     

    ####################

    # Upload Workflow file

    #

    $FND_TOP/bin/WFLOAD apps/$APPS_P  0 Y UPGRADE $XHR_TOP/workflow/xhrcmgmt.wft

     

    echo "End: 2019.setup.wrapper `date`"

  • 3. Re: Encountering : wferr: '.- 207: Could not open file
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Pl enable shell script debug by including the "set -x" command in the script immediately after the first line (#!/usr/bin/ksh) and post the related output here. How is this shell script being executed ? The error is self explanatory - either the file does not exist or there are permission issues

     

    HTH
    Srini

  • 4. Re: Encountering : wferr: '.- 207: Could not open file
    K37 Newbie
    Currently Being Moderated

    Yes, the error looks like it is saying that the file does not exist or have permissions.

    But the file exists in the same path and has all permissions(0777).

     

    This is a part from the error :

     

    Oracle Workflow Definition Loader 2.6.4.0.

     

    wferr:

    '.- 207: Could not open file '/u5403/app/oa11dev4/custom/xhr/workflow/xhrcmgmt.wft

    : command not found line 63:

    End: 2019.setup.wrapper Thu Oct  3 12:46:37 CDT 2013

     

    Unable to figure out what is wrong, everything is in place.

    But again when I try running the same command [$FND_TOP/bin/WFLOAD apps/$APPS_P  0 Y UPGRADE $XXHR_TOP/workflow/xxhrggsvtsr.wft] from outside the shell script in the puTTY, it is fine.

     

    Regards,

    Kaushal

  • 5. Re: Encountering : wferr: '.- 207: Could not open file
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    How is this shell script being executed ? Who is executing it ? I still think this is a file/directory permissions issue. Is the variable $XXHR_TOP being set correctly ? The file name has a leading open quotation mark, but no trailing quotation mark.

     

    Srini

  • 6. Re: Encountering : wferr: '.- 207: Could not open file
    K37 Newbie
    Currently Being Moderated

    Hi Srini,

     

    I am executing this as a normal user, and also tried executing this as applmgr, still gives the same error.

    And also tried placing and executing the wft file in another folder from where i have executed sql files and others to check for any folder permission issue, but still gives the error.

    And i think the environment is set properly as it executes other objects

    from the same shell script where this wft throws an error.

    And where is that place that misses any quotation mark, not sure if there s a silly syntax mistake thats being

    masked by some othrr misleading error msg.

     

    Thanks,

    Kaushal

  • 7. Re: Encountering : wferr: '.- 207: Could not open file
    Hussein Sawwan-Oracle Employee ACE
    Currently Being Moderated

    Can you reproduce the issue if you have the following command only in the shell script?

     

     

    $FND_TOP/bin/WFLOAD apps/$APPS_P  0 Y UPGRADE $XHR_TOP/workflow/xhrcmgmt.wft

     

     

    Does "echo $XHR_TOP" return "/u5403/app/oa11dev4/custom/xhr"?

     

     

    Thanks,

    Hussein

  • 8. Re: Encountering : wferr: '.- 207: Could not open file
    K37 Newbie
    Currently Being Moderated

    Hello Srini n Hussein.

     

    Thanks for the help... Found the fix, as siilly as it looks now .

    The wrapper script that I was transferring through winscp had to be done in text mode, and now everything works fine.

     

    But just curious if anybody knows how it is related and what makes the difference when the plsql got executed from the same shell script and not the workflow

    till I transferred it in text mode to the server.

     

    Regards,

    Kaushal

  • 9. Re: Encountering : wferr: '.- 207: Could not open file
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated

    Not sure why that would make a difference - a text file should be the same when transferred in text or binary mode

  • 10. Re: Encountering : wferr: '.- 207: Could not open file
    Hussein Sawwan-Oracle Employee ACE
    Currently Being Moderated

    Hi Kaushal,


    How was the script created initially? On the client side?


    What if you use the previous transfer mode and use "dos2unix" command, does it fix the issue?


    Thanks,

    Hussein

  • 11. Re: Encountering : wferr: '.- 207: Could not open file
    K37 Newbie
    Currently Being Moderated

    @srini_chavali I was wondering the same

    Hussein Sawwan-Oracle Yes, initially the script was created on client side.

                                  I havent tried the dos2unix command anywhere though, used winscp to transfer files to the unix box.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points