Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Migrating Kettle 3.2.0 to 4.0.0

  1. #1
    Join Date
    Jul 2010
    Posts
    1

    Default Migrating Kettle 3.2.0 to 4.0.0

    Today I tried to migrate from Kettle 3.2 to 4.

    Unfortunately the Java examples (http://wiki.pentaho.com/display/EAI/...a+API+Examples) haven't been updated yet to reflect the changes in Kettle 4.

    I tried the migration steps from http://wiki.pentaho.com/display/EAI/...lugin+Registry - replacing StepLoader.init() with PluginRegistry.init(). But no luck.

    When running the code from the example:

    Code:
    public static void runTransformation(String filename) {
      try {
        // StepLoader.init();  // old Kettle 3.x
        PluginRegistry.init(); // new Kettle 4.x
        EnvUtil.environmentInit();
        TransMeta transMeta = new TransMeta(filename);
        Trans trans = new Trans(transMeta);
    
        trans.execute(null); // You can pass arguments instead of null.
        trans.waitUntilFinished();
        if ( trans.getErrors() > 0 )
        {
          throw new RuntimeException( "There were errors during transformation execution." );
        }
      }
      catch ( KettleException e ) {
        // TODO Put your exception-handling code here.
        System.out.println(e);
      }
    }
    I get the following exception:

    java.lang.RuntimeException: error initializing <I REMOVED SOME DETAILS>
    Error reading object from XML file
    Unable to load step info from XML step nodeorg.pentaho.di.core.exception.KettleStepLoaderException:
    Unable to load class for step/plugin with id [CsvInput]. Check if the plugin is available in the plugins subdirectory of the Kettle distribution.
    ...

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    To initialize the Kettle environment in 4.0:

    Code:
    KettleEnvironment.init();
    Nothing else is needed. Everything else should be similar.
    There is a chapter on this topic in our new book Pentaho Kettle Solutions.

    HTH,
    Matt

Tags for this Thread

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.