{"record":{"id":"8c11be7855c142f5","repo":"pentaho/pentaho-kettle","slug":"properties-kettle-systems-settings-not-initialised","errorCode":null,"errorMessage":"Properties, Kettle systems settings, not initialised!","messagePattern":"Properties, Kettle systems settings, not initialised!","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/Props.java","lineNumber":215,"sourceCode":"      throw new RuntimeException( \"The properties systems settings are already initialised!\" );\n    }\n  }\n\n  /**\n   * Check to see whether the Kettle properties where loaded.\n   *\n   * @return true if the Kettle properties where loaded.\n   */\n  public static boolean isInitialized() {\n    return props != null;\n  }\n\n  public static Props getInstance() {\n    if ( props != null ) {\n      return props;\n    }\n\n    throw new RuntimeException( \"Properties, Kettle systems settings, not initialised!\" );\n  }\n\n  protected Props() {\n    init();\n  }\n\n  protected Props( int t ) {\n    type = t;\n    filename = getFilename();\n    init();\n  }\n\n  protected void init() {\n    createLogChannel();\n    properties = new Properties();\n    pluginHistory = new ArrayList<ObjectUsageCount>();\n\n    loadProps();","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/Props.java#L197-L233","documentation":"Props.getInstance() returns the global Kettle properties singleton and throws RuntimeException if Props.init() was never called in this JVM. Kettle requires explicit, single initialization before any code reads properties.","triggerScenarios":"Calling Props.getInstance() before any Props.init(...) call — e.g. using Kettle environment constants/props in a standalone tool or test without bootstrapping KettleEnvironment first.","commonSituations":"Unit tests accessing Props without calling KettleEnvironment.init(), embedding PDI code in a library where the host app never initializes Props, code paths executing before the bootstrap finishes (ordering bug).","solutions":["Call KettleEnvironment.init() or Props.init(type) before any use of Props.getInstance()","Fix initialization ordering so the bootstrap runs before dependent code","In tests, add an @BeforeClass that initializes Kettle environment once","Centralize access behind your own lazy initializer that calls init if needed (guarded)"],"exampleFix":"// before\nProps props = Props.getInstance();\n// after\nif (!Props.isInitialized()) {\n  Props.init(Props.TYPE_PROPERTIES_KETTLE);\n}\nProps props = Props.getInstance();","handlingStrategy":"validation","validationCode":"public static Props propsSafe() {\n  if (!Props.isInitialized()) {\n    Props.init(Props.TYPE_PROPERTIES_KETTLE);\n  }\n  return Props.getInstance();\n}","typeGuard":null,"tryCatchPattern":"try {\n  Props props = Props.getInstance();\n} catch (RuntimeException e) {\n  Props.init(Props.TYPE_PROPERTIES_KETTLE);\n  Props props = Props.getInstance();\n}","preventionTips":["Bootstrap with KettleEnvironment.init() before any Kettle API usage","Add environment init to test setup (@BeforeClass)","Do not access Props from static initializers that may run before bootstrap"],"tags":["singleton","initialization","configuration","lifecycle"],"backgroundTag":"missing-configuration","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}