Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: KettleEnvironment.init() kills my webapp

  1. #1
    Join Date
    Feb 2008
    Posts
    23

    Default KettleEnvironment.init() kills my webapp

    Hi,
    I'm trying to execute rettle transformation from my legacy web application. Transformation executes well, but aftre that application is killed - it can't find ContextFactory. My code is standad:
    Code:
               KettleEnvironment.init();
                EnvUtil.environmentInit();
    
                String trPath = getTransformationPath(account);
                if(trPath.isEmpty())
                	throw new ArgumentException("Transformation path isn't defined", null, null, true);
                
                TransMeta transMeta2 = new TransMeta(trPath);
                Trans     trans      = new Trans(transMeta2);
    
                trans.setParameterValue(FILE_INPUT_PARAM, filePath);
                trans.prepareExecution(null);
                trans.execute(null);
                trans.waitUntilFinished();
                Result r = trans.getResult();
    could anyone please advice, why kettleenvironment is diong this?
    I use Tomcat6 running under Eclipse Helios, webApp uses EJB3.0 and JDO.
    Thanks, Max
    Last edited by MaxRozenson; 03-25-2011 at 05:39 AM. Reason: environment info added

  2. #2
    Join Date
    Feb 2008
    Posts
    23

    Default

    well, i've found the reason. We should use KettleEnvironment.init(false) in case of embedding kettle in legacy applications.

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

    Default

    I'm glad we could help!

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.