title: Error while executing pentaho transformation (talking to Sql server) through java program
body: <p>I have a <strong>Kettle (5.4.0.1)</strong> transformation which executes query in <strong>MS Sql server 2008 R2</strong> in "Table Input" <em>task</em>. 
  The task executes successfully in the Spoon UI directly or through Job.
  Same transformation I want to execute through a Java program for which I got this code - </p>
  
  <pre><code>KettleEnvironment.init();
  TransMeta metaData = new TransMeta("first_transformation.ktr");
  Trans trans = new Trans( metaData );
  trans.execute( null );
  trans.waitUntilFinished();
  </code></pre>
  
  <p>But on executing it in a java program I get this error - </p>
  
  <blockquote>
    <p>2015/07/30 20:08:34 - TestTransformation - Dispatching started for
    transformation [TestTransformation] 2015/07/30 20:08:34 - XML Output.0
    - Opening output stream in encoding: UTF-8 2015/07/30 20:08:34 - Table input.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55
    by buildguy) : An error occurred, processing will be stopped: 
    2015/07/30 20:08:34 - Table input.0 - Error occurred while trying to
    connect to the database 2015/07/30 20:08:34 - Table input.0 -
    java.io.File parameter must be a directory.
    [C:\Root\EclipseWorkSpace\TestProject\simple-jndi] 2015/07/30 20:08:34
    - Table input.0 - Finished reading query, closing connection. 2015/07/30 20:08:34 - Table input.0 - ERROR (version 5.4.0.1-130,
    build 1 from 2015-06-14_12-34-55 by buildguy) : Error initializing
    step [Table input] 2015/07/30 20:08:34 - TestTransformation - ERROR
    (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) :
    Step [Table input.0] failed to initialize!
    org.pentaho.di.core.exception.KettleException:  We failed to
    initialize at least one step.  Execution can not begin! at
    org.pentaho.di.trans.Trans.prepareExecution(Trans.java:1149) at
    org.pentaho.di.trans.Trans.execute(Trans.java:607) at
    TestKettle.main(TestKettle.java:24)</p>
  </blockquote>
  
  <p>What could be the issue here as the database connection happens successfully while executing through UI and same KTR file I am trying to execute in above code? </p>