{"record":{"id":"465c5ca0e2fe4417","repo":"pentaho/pentaho-kettle","slug":"zipfilemeta-exception-unabletoreadstepinfo","errorCode":null,"errorMessage":"ZipFileMeta.Exception.UnableToReadStepInfo","messagePattern":"ZipFileMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/zipfile/ZipFileMeta.java","lineNumber":238,"sourceCode":"    parentStepMeta.getParentTransMeta().getNamedClusterEmbedManager().registerUrl( baseFolderField );\n    return retval.toString();\n  }\n\n  private void readData( Node stepnode ) throws KettleXMLException {\n    try {\n      sourcefilenamefield = XMLHandler.getTagValue( stepnode, \"sourcefilenamefield\" );\n      targetfilenamefield = XMLHandler.getTagValue( stepnode, \"targetfilenamefield\" );\n      baseFolderField = XMLHandler.getTagValue( stepnode, \"baseFolderField\" );\n      operationType =\n        getOperationTypeByCode( Const.NVL( XMLHandler.getTagValue( stepnode, \"operation_type\" ), \"\" ) );\n      addresultfilenames = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"addresultfilenames\" ) );\n      overwritezipentry = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"overwritezipentry\" ) );\n      createparentfolder = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"createparentfolder\" ) );\n      keepsourcefolder = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"keepsourcefolder\" ) );\n      movetofolderfield = XMLHandler.getTagValue( stepnode, \"movetofolderfield\" );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"ZipFileMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      sourcefilenamefield = rep.getStepAttributeString( id_step, \"sourcefilenamefield\" );\n      targetfilenamefield = rep.getStepAttributeString( id_step, \"targetfilenamefield\" );\n      baseFolderField = rep.getStepAttributeString( id_step, \"baseFolderField\" );\n      operationType =\n        getOperationTypeByCode( Const.NVL( rep.getStepAttributeString( id_step, \"operation_type\" ), \"\" ) );\n      addresultfilenames = rep.getStepAttributeBoolean( id_step, \"addresultfilenames\" );\n      overwritezipentry = rep.getStepAttributeBoolean( id_step, \"overwritezipentry\" );\n      createparentfolder = rep.getStepAttributeBoolean( id_step, \"createparentfolder\" );\n      keepsourcefolder = rep.getStepAttributeBoolean( id_step, \"keepsourcefolder\" );\n      movetofolderfield = rep.getStepAttributeString( id_step, \"movetofolderfield\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/zipfile/ZipFileMeta.java#L220-L256","documentation":"ZipFileMeta.loadXML wraps any Exception thrown while reading the step's settings from a .ktr XML node into this KettleXMLException. It means the step metadata could not be deserialized from the transformation file, so the transformation cannot load this step.","triggerScenarios":"loadXML -> readData encounters malformed or unexpected XML in a <zip_file> step node — e.g. XMLHandler.getTagValue throwing on a corrupt or hand-edited .ktr file, or incompatible/older step XML produced by a different PDI version.","commonSituations":"Corrupt or truncated .ktr after a bad save or merge conflict; hand-editing transformation XML; opening a transformation exported from a much older/newer Pentaho version whose step XML schema changed.","solutions":["Inspect the chained cause 'e' for the exact parsing problem and the offending .ktr location.","Open the .ktr in the Spoon GUI; if it fails, recreate the ZipFile step and re-enter its settings.","Recover the transformation from version control or a backup copy.","Align PDI versions — export/import between mismatched Pentaho versions can change step XML layout."],"exampleFix":"// before: hand-edited step node missing required tags\n<zip_file><sourcefilenamefield>filename</sourcefilenamefield></zip_file>\n// after: restore the full step XML via Spoon save, not manual editing\n<zip_file>\n  <sourcefilenamefield>filename</sourcefilenamefield>\n  <sourcemultiplefiles>N</sourcemultiplefiles>\n  ...\n</zip_file>","handlingStrategy":"try-catch","validationCode":"Document doc = XMLHandler.loadXMLFile(new File(ktrPath));\nif (XMLHandler.getSubNode(XMLHandler.getFirstSubNode(doc, \"transformation\"), \"step\") == null) {\n    throw new IllegalStateException(\"No steps in \" + ktrPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n    transMeta = new TransMeta(ktrPath);\n} catch (KettleXMLException e) {\n    if (e.getMessage().contains(\"UnableToReadStepInfo\")) { /* restore/recreate step metadata */ }\n    throw e;\n}","preventionTips":["Edit .ktr files only via Spoon; never hand-edit step XML.","Keep transformations in version control to recover from corrupt saves.","Use matching PDI versions for exporting and importing transformations."],"tags":["xml","metadata","deserialization","kettle"],"backgroundTag":"xml-parse-error","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"}