Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Problem Run a job from Repository

  1. #1
    Join Date
    Nov 2013
    Posts
    2

    Default Problem Run a job from Repository

    Hi,

    i am using data integration 4.2.0.

    I have a problem with running a job from Repository.
    I have a script php that lunches the job using this command:
    PHP Code:
    $WshShell = new COM("WScript.Shell");
    $oExec =  $WshShell->Run('C:\pdi42\data-integration\Kitchen.bat /rep:"RepoPAS400" /job:"Main_Job"  /dir:"C:\pdi42\ETL\AS400\"  /user:---- /pass:----  /level:Detailed >> D:\loglEtl\log.txt'0false); 
    i also tried:
    PHP Code:
    $oExec =  
    $WshShell->Run('C:\pdi42\data-integration\Kitchen.bat /rep:"RepoPAS400" /user:"admin" /dir:"/Jobs" /job:"Main_Job"  /level:Detailed >> D:\loglEtl\log.txt'0false); 
    and other variations

    The thing is this the last command works when lunched from a cmd. But lunching it from php always gives a repository not found error.
    When I lunch the php script, in the log file there is this message:

    Code:
    WARNING: Using java from path
    DEBUG: _PENTAHO_JAVA_HOME=
    DEBUG: _PENTAHO_JAVA=java.exe
    INFO  28-11 12:45:07,540 - Kitchen - Il log è al livello: Log dettagliato
    INFO  28-11 12:45:07,540 - Kitchen - Sono stati forniti repository e username
    INFO  28-11 12:45:07,540 - Kitchen - Avvio dell'esecuzione.
    ERRORE: nessun repository specificato, impossibile caricare il job.
    ERRORE: Kitchen non può continuare poiché il job non può essere caricato.
    (translated it says that the repository is not specified)


    Some more info but i think this doesn't change anything
    The file "Main_Job.kjb" is in the folder: C:\pdi42\ETL\AS400\Jobs and the repository is set to C:\pdi42\ETL\AS400I found the file "repository.xml" in my user folder so i copied it in the pdi folder but nothing changed. I opened the file inside i see there is the repository definition.


    Help me!!!!

    Thanks all
    Last edited by iandaniel; 11-28-2013 at 08:16 AM. Reason: better description and added info

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Daniel,

    I'm going to ask you to do a few things that seem strange, but will help you a lot in the long run.

    1) Please create a new batch file (Main.bat ) as follows:
    Code:
    echo %USERNAME% > D:\logETL\MainBat.log
    C:\pdi42\data-integration\Kitchen.bat /rep:"RepoPAS400" /user:"admin" /dir:"/Jobs" /job:"Main_Job"  /level:Detailed >> D:\logETL\MainBat.log
    2) Change your PHP Script item to run Main.Bat instead of the Kitchen.bat line
    3) Post the MainBat.log file here

    Doing this will show you who is actually running the Kitchen command, which will often show you the root of the problem
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  3. #3
    Join Date
    Nov 2013
    Posts
    2

    Default

    Hi gutlez

    thanks for your suggestion
    in the log i find that the user WIN-V21GV89RTFF$ is executing the cmd and probably he has no permissions
    i will grant permissions and will post again if i have solved the problem

    thanks again

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Make sure that there is a Repositories.xml in that user's home directory.

    Alternatively, modify the batch file I provided to include:

    SET KETTLE_HOME=C:\pdi42\data-integration

    **Before** the call to Kitchen.bat
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.