{"record":{"id":"55593a3c3cbc6d70","repo":"pentaho/pentaho-kettle","slug":"plugin-s-plugin-properties-file-could-not-be-read","errorCode":null,"errorMessage":"Plugin's plugin.properties file could not be read.","messagePattern":"Plugin's plugin\\.properties file could not be read\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/plugins/PluginInterface.java","lineNumber":203,"sourceCode":"  }\n\n  /**\n   * @return Plugin properties\n   * Returns a Properties object containing any properties in a plugin.properties file\n   * in the plugin directopry. The method will return null if the plugin.properties\n   * does not exist.\n   **/\n  default Properties getPluginProperties() throws KettleException {\n    String pluginPropsFilePath = getPluginDirectory().getPath() + \"/plugin.properties\";\n    File pluginPropsFile = new File( pluginPropsFilePath );\n    if ( !pluginPropsFile.exists() ) {\n      return null;\n    }\n    Properties pluginProps = new Properties();\n    try {\n      pluginProps.load( new FileInputStream( pluginPropsFile ) );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Plugin's plugin.properties file could not be read.\", e );\n    }\n    return pluginProps;\n  }\n  \n  /**\n   * @return a boolean that indicates if this plugin id is deprecated. The getSuggestion()\n   * should be used when deprecated to indicate an id of a replacement plugin id.\n   */\n  default boolean isDeprecated() {\n    return false;\n  }\n  \n}\n","sourceCodeStart":185,"sourceCodeEnd":217,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/plugins/PluginInterface.java#L185-L217","documentation":"PluginInterface.getPluginProperties loads the plugin's plugin.properties file from disk into a Properties object. If pluginPropsFile exists (non-null) but reading it fails — I/O error, permission denied, or malformed stream — a KettleException with this message is thrown, wrapping the underlying cause.","triggerScenarios":"getPluginProperties() is called on a PluginInterface whose pluginPropsFile points to an existing file that cannot be loaded: unreadable permissions, a directory at that path, file deleted between existence check and load, or a FileInputStream creation/IO failure.","commonSituations":"plugin.properties has restrictive permissions after deployment; file was packaged incorrectly (partial/zero-length or corrupt); the plugin folder was moved without updating the plugin's paths; on some systems the file is a broken symlink.","solutions":["Check the wrapped cause exception and verify the plugin.properties path exists and is readable (ls -l).","Fix file permissions on plugin.properties for the user running Pentaho/Kettle.","Reinstall/re-extract the plugin so a valid plugin.properties is present.","Rebuild the plugin jar/zip ensuring plugin.properties is included at the plugin root and not corrupted."],"exampleFix":"// before\nFile props = new File(pluginFolder, \"plugin.properties\"); // permissions 600, other user\n\n// after\nFile props = new File(pluginFolder, \"plugin.properties\");\nif (!props.canRead()) {\n  throw new IllegalStateException(\"Not readable: \" + props);\n}\n// and on deploy: chmod 644 plugin.properties","handlingStrategy":"try-catch","validationCode":"File props = plugin.getPluginPropsFile();\nif (props != null && !(props.isFile() && props.canRead())) {\n  throw new IllegalStateException(\"plugin.properties unreadable at \" + props);\n}","typeGuard":"static boolean isReadableFile(java.io.File f) {\n  return f != null && f.isFile() && f.canRead();\n}","tryCatchPattern":"try {\n  props = plugin.getPluginProperties();\n} catch (KettleException e) {\n  log.error(\"Failed to read plugin.properties: \" + e.getCause(), e);\n  props = new Properties(); // degrade gracefully\n}","preventionTips":["Ship a valid plugin.properties in every plugin build and verify in CI packaging tests.","Deploy plugins as the same user that runs Pentaho, or chmod 644 resource files.","Avoid editing plugin.properties in place on production servers; redeploy instead.","Inspect e.getCause() to differentiate missing file vs IO errors."],"tags":["kettle","plugins","filesystem","properties"],"backgroundTag":"file-read-failed","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"}