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.
The exception is:
I have executed this
. The kettle.properties file is empty.
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)
Code:
KettleEnvironment.init();