Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: Create metadata Domain via API: Exception 'Properties ... not initialised!'

  1. #1
    Join Date
    Sep 2013
    Posts
    7

    Default Create metadata Domain via API: Exception 'Properties ... not initialised!'

    I am trying to create a Pentaho metadata Domain using the Java class </pentaho-metadata/src/org/pentaho/metadata/automodel/AutoModelerScenario.java>. When creating an Data Model using Pentaho automodel API, I run into an exception. Please suggest how to resolve the exception:


    Root cause: Code referenced from Props.java at <http://trac.spatialytics.com/geokettle/browser/trunk/src-core/org/pentaho/di/core/Props.java>. However Props constructor is protected, not public , so I can't instantiate it.


    Code:
    public static Props getInstance()
                {
                        if (props!=null) return props;
                       
                        throw new RuntimeException("Properties, Kettle systems settings, not initialised!");
                }

    The exception is:


    Code:
    Exception in thread "main" org.pentaho.pms.core.exception.PentahoMetadataException:     java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
            at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:127)
            at org.abc.poc.AutoModelerScenario.<init>(Unknown Source)
            at org.abc.poc.MyApplication.main(Unknown Source)
          Caused by: java.lang.RuntimeException: Properties, Kettle systems settings, not initialised!
              at org.pentaho.di.core.Props.getInstance(Props.java:229)
              at org.pentaho.pms.util.Settings.getBusinessTableIDPrefix(Settings.java:46)
              at org.pentaho.metadata.util.Util.proposeSqlBasedLogicalTableId(Util.java:124)
              at org.pentaho.metadata.automodel.AutoModeler.createBusinessTable(AutoModeler.java:157)
              at org.pentaho.metadata.automodel.AutoModeler.generateDomain(AutoModeler.java:121)
    I have executed this
    Code:
    KettleEnvironment.init();
    . The kettle.properties file is empty.
    Last edited by trey; 09-12-2013 at 09:20 AM.

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.