{"record":{"id":"25f1f104eb65476c","repo":"pentaho/pentaho-kettle","slug":"error-adding-item-to-feed","errorCode":null,"errorMessage":"Error adding item to feed","messagePattern":"Error adding item to feed","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/rss/impl/src/main/java/org/pentaho/di/trans/steps/rssoutput/RssOutput.java","lineNumber":523,"sourceCode":"      }\n      if ( data.indexOfFielditempubdate > -1 ) {\n        itemdatevalue = data.inputRowMeta.getDate( r, data.indexOfFielditempubdate );\n      }\n      if ( data.indexOfFielditemdescription > -1 ) {\n        itemdescvalue = data.inputRowMeta.getString( r, data.indexOfFielditemdescription );\n      }\n      if ( data.indexOfFielditempointx > -1 ) {\n        itemgeopointx = data.inputRowMeta.getString( r, data.indexOfFielditempointx );\n      }\n      if ( data.indexOfFielditempointy > -1 ) {\n        itemgeopointy = data.inputRowMeta.getString( r, data.indexOfFielditempointy );\n      }\n\n      // Now add entry ..\n      if ( !createEntry(\n        itemauthorvalue, itemtitlevalue, itemlinkvalue, itemdatevalue, itemdescvalue, itemgeopointx,\n        itemgeopointy ) ) {\n        throw new KettleException( \"Error adding item to feed\" );\n      }\n    } else {\n\n      // Set item tag at each row received\n      if ( meta.isDisplayItem() ) {\n        data.itemtag = data.channel.addElement( \"item\" );\n      }\n      for ( int i = 0; i < data.customitems.length; i++ ) {\n        // get item value and name\n        String itemname = environmentSubstitute( meta.getItemCustomTags()[i] );\n        String itemvalue = data.inputRowMeta.getString( r, data.customitems[i] );\n\n        if ( log.isDetailed() ) {\n          logDetailed( \"outputting item value <\" + itemname + \">\" + itemvalue + \"<\" + itemname + \"/>\" );\n        }\n\n        // add Item\n        if ( meta.isDisplayItem() ) {","sourceCodeStart":505,"sourceCodeEnd":541,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/rss/impl/src/main/java/org/pentaho/di/trans/steps/rssoutput/RssOutput.java#L505-L541","documentation":"The RSS Output step throws this KettleException when createEntry() returns false while attempting to add an item to the RSS feed. createEntry builds the DOM4J <item> element from the author/title/link/date/description/geo values; a false return means the item element could not be constructed/attached (e.g. the feed channel element is null because the feed document was not initialized, or invalid values were passed).","triggerScenarios":"processRow calls createEntry(...) and it returns false — typically when the feed document/channel was not created (createParentFolder failed or custom RSS init failed) so the item cannot be appended, or required item values are unusable.","commonSituations":"Feed header/channel settings misconfigured so data.channel is null; item field values resolved to null/empty due to upstream nulls; running the step with rows arriving before channel creation completed.","solutions":["Check the step log for the earlier warning/exception explaining why the channel document failed to initialize.","Verify the RSS Output dialog's feed header (channel title, link, description) settings are complete.","Ensure upstream fields feeding author/title/link/date are non-null (add an 'If field value is null' or Filter step).","Upgrade/patch the plugin if createEntry persistently returns false with valid config (DOM4J document state issue)."],"exampleFix":"// before: nulls flow into the step\n// rows contain null title/link\n// after: sanitize upstream\n// add 'If field value is null' step mapping nulls to '' before RSS Output","handlingStrategy":"try-catch","validationCode":"// Ensure required item values are non-null before they reach the step:\nString title = row.getString(\"item_title\");\nif (title == null || title.isEmpty()) {\n    throw new IllegalStateException(\"Item title is required for the feed\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    transformation.execute();\n} catch (KettleException e) {\n    if (e.getMessage().contains(\"Error adding item to feed\")) {\n        log.error(\"Feed item construction failed; check channel init and null inputs\", e);\n    }\n}","preventionTips":["Sanitize nulls upstream with 'If field value is null' steps","Complete all feed header (channel) settings in the step dialog","Check step logs for earlier createParentFolder warnings","Test feed generation with a small sample dataset first"],"tags":["pentaho-kettle","rss-output","dom4j","feed-generation"],"backgroundTag":"internal-invariant-violation","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"}