Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Newbie question about environment initialization

  1. #1
    Join Date
    Oct 2015
    Posts
    4

    Default Newbie question about environment initialization

    Hi,
    I'm trying to set up environment to develop DI solution with java, but my code fails when call KettleEnvironment.init() method.
    I'm working with windows 7 OS and I have configured environment variable like that: KETTLE_HOME = C:\Users\X (where in X there is .kettle dir). What's wrong?
    Thanks in advance.
    Here is the stack trace:

    Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.pentaho.di.core.KettleClientEnvironment.createKettleHome(KettleClientEnvironment.java:116)
    at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:72)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:91)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:69)
    at it.fabricalab.edu.di.kettle.main.Main.main(Main.java:39)
    Caused by: java.lang.NullPointerException
    at org.pentaho.di.laf.BasePropertyHandler.getProperty(BasePropertyHandler.java:86)
    at org.pentaho.di.core.Const.getUserBaseDir(Const.java:1716)
    at org.pentaho.di.core.Const.getKettleDirectory(Const.java:1706)
    at org.pentaho.di.core.Const.<clinit>(Const.java:201)
    ... 5 more

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    What version of PDI are you coding against?
    const.java:201 is comment line in current code.

    What happens if you don't have KETTLE_HOME set at all?

  3. #3
    Join Date
    Oct 2015
    Posts
    4

    Default

    Version 5.4.0.1-130
    Same problem even if I drop environment variable.
    Tested with both java 7-8.

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Most users use PDI directly as-is rather than building it deeper into a java program.

    You are getting a Null Pointer in const.java on line 201 of the code-base that you're using. However I'm not sure quite what that line is trying to do.

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.