Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-117

Importing Jobs through Java API fails with "null jobPlugin for SPECIAL" error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Low
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Operating System/s:
      Windows XP

      Description

      Summary :

      Importing Jobs through Java API fails with "null jobPlugin for SPECIAL" error

      Environment:

      Operating System :
      Microsoft Windows XP [Version 5.1.2600]

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

      I get this 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 + " 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

      ----------

      You can try reproducing the issue with CreateRepositories program in src/test folder of Kettle installation. I used the same program and modified it with importAll function call.

      I can provide more details if needed.

      Thanks,
      Tapasvi

        Attachments

          Activity

            People

            Assignee:
            sboden Sven Boden
            Reporter:
            tapasvi tapasvi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: