Quantcast
Channel: Error while executing pentaho transformation (talking to Sql server) through java program - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Error while executing pentaho transformation (talking to Sql server) through java program

$
0
0

I have a Kettle (5.4.0.1) transformation which executes query in MS Sql server 2008 R2 in "Table Input"task. 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 -

KettleEnvironment.init();TransMeta metaData = new TransMeta("first_transformation.ktr");Trans trans = new Trans( metaData );trans.execute( null );trans.waitUntilFinished();

But on executing it in a java program I get this error -

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)

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?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images