AnsweredAssumed Answered

Job containing "Build Model" step works in Spoon but fails on Kitchen

Question asked by Stefano Piva Employee on Sep 21, 2018

Hi,

I am developing a PDI job that:

  • executes a transformation that loads data into a PostgreSQL table
  • builds a model based on the table output step of the transformation using auto modeler
  • publishes the model to the server

Untitled.png

Both the job and transformation run fine when launched from Spoon.

Also the transformation runs fine when launched from Pan using

 

Pan.bat /file:C:\path\to\transformation.ktr

 

The issue arise when I try to run the job using Kitchen and the following command

Kitchen.bat /file: C:\path\to\job.kjb

 

Here you can fine the output of the command

2018/09/21 15:55:53 - test - Start of job execution
2018/09/21 15:55:53 - Carte - Installing timer to purge stale objects after 1440 minutes.
2018/09/21 15:55:53 - test - Starting entry [DUMMY]
2018/09/21 15:55:53 - test - Starting entry [Transformation]
2018/09/21 15:55:53 - Transformation - Loading transformation from XML file [file:///C:/Workspace/hvs-pdi/src/test/test.ktr]
2018/09/21 15:55:53 - Transformation - Using run configuration [Pentaho local]
2018/09/21 15:55:53 - Transformation - Using legacy execution engine
2018/09/21 15:55:53 - test - Dispatching started for transformation [test]
2018/09/21 15:55:54 - Table output.0 - Connected to database [Localhost2] (commit=1000)
2018/09/21 15:55:54 - Generate Rows.0 - Finished processing (I=0, O=0, R=0, W=10, U=0, E=0)
2018/09/21 15:55:54 - Add constants.0 - Finished processing (I=0, O=0, R=10, W=10, U=0, E=0)
2018/09/21 15:55:54 - Table output.0 - Finished processing (I=0, O=10, R=10, W=10, U=0, E=0)
2018/09/21 15:55:54 - test - Starting entry [Build Model]
2018/09/21 15:55:54 - Build Model - Setting variable JobEntryBuildModel.DatabaseConnection.TestModel to Localhost2
org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
        at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:134)
        at org.pentaho.agilebi.modeler.util.ModelerSourceUtil.generateDomain(ModelerSourceUtil.java:152)
        at org.pentaho.agilebi.modeler.util.TableModelerSource.generateDomain(TableModelerSource.java:77)
        at org.pentaho.di.core.refinery.model.DswModeler.createModel(DswModeler.java:126)
        at org.pentaho.di.job.entries.build.JobEntryBuildModel.buildXmi(JobEntryBuildModel.java:249)
        at org.pentaho.di.job.entries.build.JobEntryBuildModel.execute(JobEntryBuildModel.java:400)
        at org.pentaho.di.job.Job.execute(Job.java:676)
        at org.pentaho.di.job.Job.execute(Job.java:817)
        at org.pentaho.di.job.Job.execute(Job.java:817)
        at org.pentaho.di.job.Job.execute(Job.java:817)
        at org.pentaho.di.job.Job.execute(Job.java:493)
        at org.pentaho.di.job.Job.run(Job.java:380)
Caused by: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
        at org.pentaho.di.core.Props.getInstance(Props.java:223)
        at org.pentaho.pms.util.Settings.getBusinessTableIDPrefix(Settings.java:42)
        at org.pentaho.metadata.util.Util.proposeSqlBasedLogicalTableId(Util.java:196)
        at org.pentaho.metadata.automodel.AutoModeler.createBusinessTable(AutoModeler.java:168)
        at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:128)
        ... 11 more


2018/09/21 15:55:54 -  - Loading transformation from XML file [file:///C:/Workspace/hvs-pdi/src/test/test.ktr]
2018/09/21 15:55:54 - Build Model - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) :
2018/09/21 15:55:54 - Build Model - org.pentaho.agilebi.modeler.ModelerException: org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model - org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : org.pentaho.di.core.exception.KettleException:
2018/09/21 15:55:54 - Build Model - org.pentaho.agilebi.modeler.ModelerException: org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model - org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model -
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.entries.build.JobEntryBuildModel.buildXmi(JobEntryBuildModel.java:268)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.entries.build.JobEntryBuildModel.execute(JobEntryBuildModel.java:400)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.execute(Job.java:676)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.execute(Job.java:817)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.execute(Job.java:817)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.execute(Job.java:817)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.execute(Job.java:493)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.Job.run(Job.java:380)
2018/09/21 15:55:54 - Build Model - Caused by: org.pentaho.agilebi.modeler.ModelerException: org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model -     at org.pentaho.agilebi.modeler.util.ModelerSourceUtil.generateDomain(ModelerSourceUtil.java:198)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.agilebi.modeler.util.TableModelerSource.generateDomain(TableModelerSource.java:77)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.core.refinery.model.DswModeler.createModel(DswModeler.java:126)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.job.entries.build.JobEntryBuildModel.buildXmi(JobEntryBuildModel.java:249)
2018/09/21 15:55:54 - Build Model -     ... 7 more
2018/09/21 15:55:54 - Build Model - Caused by: org.pentaho.pms.core.exception.PentahoMetadataException: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model -     at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:134)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.agilebi.modeler.util.ModelerSourceUtil.generateDomain(ModelerSourceUtil.java:152)
2018/09/21 15:55:54 - Build Model -     ... 10 more
2018/09/21 15:55:54 - Build Model - Caused by: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
2018/09/21 15:55:54 - Build Model -     at org.pentaho.di.core.Props.getInstance(Props.java:223)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.pms.util.Settings.getBusinessTableIDPrefix(Settings.java:42)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.metadata.util.Util.proposeSqlBasedLogicalTableId(Util.java:196)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.metadata.automodel.AutoModeler.createBusinessTable(AutoModeler.java:168)
2018/09/21 15:55:54 - Build Model -     at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:128)
2018/09/21 15:55:54 - Build Model -     ... 11 more
2018/09/21 15:55:54 - test - Finished job entry [Build Model] (result=[false])
2018/09/21 15:55:54 - test - Finished job entry [Transformation] (result=[false])
2018/09/21 15:55:54 - test - Finished job entry [DUMMY] (result=[false])
2018/09/21 15:55:54 - test - Job execution finished
2018/09/21 15:55:54 - Kitchen - Finished!
2018/09/21 15:55:54 - Kitchen - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Finished with errors
2018/09/21 15:55:54 - Kitchen - Start=2018/09/21 15:55:29.992, Stop=2018/09/21 15:55:54.241
2018/09/21 15:55:54 - Kitchen - Processing ended after 24 seconds.

 

All the components are located on my Windows machine and both PostgreSQL and Pentaho Server are available on localhost.

I am currently using 8.1 EE evaluation version but I also did try running the job even on PDI EE on Ubuntu.

Do i need to pass any particular option at the moment of invoking Kitchen?

Also my kettle.properties can be found in his default location at C:\Users\myuser\.kettle and the output did not change even after setting an KETTLE_HOME environmental variable with value C:\Users\myuser.

Did anyone of you knows what could be causing this or has any advice to share?

You can find attached both the job and the transformation in case you want to take a look.

Thank you very much.

Attachments

Outcomes