Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Null Job plugin for SPECIAL

  1. #1

    Default Null Job plugin for SPECIAL

    Hi.

    I am using kettle 2.5.0 GA

    (version 2.5.0, build 25002 from 2007/05/04 00:20:04)

    I get following error while trying to write custom java program to import repository into DB. I'm able to import all the transformations. But following code for importing Jobs doesnt work.

    // Execute again for the jobs...
    Node jobsnode = XMLHandler.getSubNode(repnode, "jobs");
    if (jobsnode != null) // Load jobs...
    {
    int nrjobs = XMLHandler.countNodes(jobsnode, "job");
    for (int i = 0; i < nrjobs; i++) {
    Node jobnode = XMLHandler.getSubNodeByNr(jobsnode, "job", i);
    // Load the job from the XML node.
    JobMeta ji = new JobMeta(log, jobnode, rep);
    log.logBasic("Import job " + Integer.toString(i + 1) + " / " + Integer.toString(nrjobs) + " : " + ji.getName(),"");
    // What's the directory path?
    String directoryPath = Const.NVL(XMLHandler.getTagValue(jobnode, "directory"), Const.FILE_SEPARATOR);
    RepositoryDirectory targetDirectory = baseDirectory.findDirectory(directoryPath);
    if (targetDirectory == null) {
    log.logBasic("Creating directory [" + directoryPath + "] as subdir in [" + baseDirectory.toString() + "]","");
    targetDirectory = baseDirectory.createDirectory(rep, directoryPath);
    }
    // OK, we loaded the job from XML and all went well...
    // See if the job already exists!
    ji.setDirectory(targetDirectory);
    ji.saveRep(rep);
    log.logBasic("Saved job " + Integer.toString(i) + " in the repository as " + ji.getName(),"");
    }
    }

    Following is the error stacktrace:

    null jobPlugin for SPECIAL
    15:42:46,140 ERROR [There was an error while importing repository objects from an XML file] There was an error while importing repository objects from an XML file - F:\Huron\ofs\conf\.kettle\ETLRepository.xml
    be.ibridge.kettle.core.exception.KettleXMLExceptio n:
    Unable to load job info from XML node
    at com.intellij.rt.execution.application.AppMain.main (AppMain.java:90)
    at java.lang.reflect.Method.invoke (Method.java:324)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
    at com.oatsystems.atf.ImportKettleRepository.main (ImportKettleRepository.java:59)
    at com.oatsystems.atf.ImportKettleRepository.setup (ImportKettleRepository.java:101)
    at com.oatsystems.atf.ImportKettleRepository.importAl l (ImportKettleRepository.java:179)
    at be.ibridge.kettle.job.JobMeta.<init> (JobMeta.java:623)
    at be.ibridge.kettle.job.JobMeta.loadXML (JobMeta.java:752)
    at be.ibridge.kettle.job.entry.JobEntryCopy.<init> (JobEntryCopy.java:124)
    at be.ibridge.kettle.job.entry.JobEntryCopy.toString (JobEntryCopy.java:515)
    at be.ibridge.kettle.job.JobMeta.loadXML(JobMeta.java :807)
    at be.ibridge.kettle.job.JobMeta.<init>(JobMeta.java: 623)
    at com.oatsystems.atf.ImportKettleRepository.importAl l(ImportKettleRepository.java:179)
    at com.oatsystems.atf.ImportKettleRepository.setup(Im portKettleRepository.java:101)
    at com.oatsystems.atf.ImportKettleRepository.main(Imp ortKettleRepository.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.intellij.rt.execution.application.AppMain.main (AppMain.java:90)
    Caused by: java.lang.NullPointerException
    at be.ibridge.kettle.job.entry.JobEntryCopy.toString( JobEntryCopy.java:515)
    at be.ibridge.kettle.job.entry.JobEntryCopy.<init>(Jo bEntryCopy.java:124)
    at be.ibridge.kettle.job.JobMeta.loadXML(JobMeta.java :752)
    ... 9 more
    Process finished with exit code 0
    Any suggestions ? I seem to be missing to pass something to cause that null pointer exception.

    following is an example job :

    <job>
    <name>Send notification for all receipts</name>
    <description/>
    <extended_description/>
    <job_version/>
    <job_status>0</job_status>
    <directory>&#47;Shared</directory>
    <created_user>admin</created_user>
    <created_date>2007&#47;06&#47;29 16:10:44.657</created_date>
    <modified_user>admin</modified_user>
    <modified_date>2007&#47;07&#47;10 18:32:19.783</modified_date>
    <logconnection/>
    <logtable/>
    <use_batchid>Y</use_batchid>
    <pass_batchid>N</pass_batchid>
    <use_logfield>Y</use_logfield>
    <shared_objects_file/>
    <entries>
    <entry>
    <name>Start</name>
    <description/>
    <type>SPECIAL</type>
    <start>Y</start>
    <dummy>N</dummy>
    <repeat>N</repeat>
    <schedulerType>0</schedulerType>
    <interval>0</interval>
    <hour>12</hour>
    <minutes>0</minutes>
    <weekDay>1</weekDay>
    <DayOfMonth>1</DayOfMonth>
    <parallel>N</parallel>
    <draw>Y</draw>
    <nr>0</nr>
    <xloc>76</xloc>
    <yloc>133</yloc>
    </entry>
    <entry>
    <name>Dummy</name>
    <description/>
    <type>SPECIAL</type>
    <start>N</start>
    <dummy>Y</dummy>
    <repeat>N</repeat>
    <schedulerType>0</schedulerType>
    <interval>0</interval>
    <hour>12</hour>
    <minutes>0</minutes>
    <weekDay>1</weekDay>
    <DayOfMonth>1</DayOfMonth>
    <parallel>N</parallel>
    <draw>Y</draw>
    <nr>0</nr>
    <xloc>563</xloc>
    <yloc>133</yloc>
    </entry>
    <entry>
    <name>Send notification email</name>
    <description/>
    <type>JOB</type>
    <filename/>
    <jobname>Send notification email</jobname>
    <directory>&#47;Shared</directory>
    <arg_from_previous>N</arg_from_previous>
    <exec_per_row>Y</exec_per_row>
    <set_logfile>N</set_logfile>
    <logfile/>
    <logext/>
    <add_date>N</add_date>
    <add_time>N</add_time>
    <loglevel>Error</loglevel>
    <parallel>N</parallel>
    <draw>Y</draw>
    <nr>0</nr>
    <xloc>391</xloc>
    <yloc>133</yloc>
    </entry>
    <entry>
    <name>Get All Email Address</name>
    <description/>
    <type>TRANS</type>
    <filename/>
    <transname>Get All Email Address</transname>
    <directory>&#47;Shared</directory>
    <arg_from_previous>N</arg_from_previous>
    <exec_per_row>N</exec_per_row>
    <clear_rows>Y</clear_rows>
    <clear_files>Y</clear_files>
    <set_logfile>N</set_logfile>
    <logfile/>
    <logext/>
    <add_date>N</add_date>
    <add_time>N</add_time>
    <loglevel>Error</loglevel>
    <cluster>N</cluster>
    <parallel>N</parallel>
    <draw>Y</draw>
    <nr>0</nr>
    <xloc>222</xloc>
    <yloc>133</yloc>
    </entry>
    </entries>
    <hops>
    <hop>
    <from>Start</from>
    <to>Get All Email Address</to>
    <from_nr>0</from_nr>
    <to_nr>0</to_nr>
    <enabled>Y</enabled>
    <evaluation>Y</evaluation>
    <unconditional>Y</unconditional>
    </hop>
    <hop>
    <from>Get All Email Address</from>
    <to>Send notification email</to>
    <from_nr>0</from_nr>
    <to_nr>0</to_nr>
    <enabled>Y</enabled>
    <evaluation>Y</evaluation>
    <unconditional>Y</unconditional>
    </hop>
    <hop>
    <from>Send notification email</from>
    <to>Dummy</to>
    <from_nr>0</from_nr>
    <to_nr>0</to_nr>
    <enabled>Y</enabled>
    <evaluation>Y</evaluation>
    <unconditional>Y</unconditional>
    </hop>
    </hops>
    <notepads>
    <notepad>
    <note>For each partner, launch all partner dependent sub-jobs for EDM</note>
    <xloc>71</xloc>
    <yloc>48</yloc>
    <width>321</width>
    <heigth>23</heigth>
    </notepad>
    </notepads>
    </job>

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    I'm guessing it has to do with this: http://forums.pentaho.org/showthread.php?t=48949

    As a test... can you import the xml file the normal way.

    Regards,
    Sven

  3. #3

    Default

    Yes I can import the xml file through spoon in a normal way.

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.