pentaho/pentaho-kettle · error · KettleException

Error adding item to feed

Error message

Error adding item to feed

What it means

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).

Solutions

  1. Check the step log for the earlier warning/exception explaining why the channel document failed to initialize.
  2. Verify the RSS Output dialog's feed header (channel title, link, description) settings are complete.
  3. Ensure upstream fields feeding author/title/link/date are non-null (add an 'If field value is null' or Filter step).
  4. Upgrade/patch the plugin if createEntry persistently returns false with valid config (DOM4J document state issue).

Example fix

// before: nulls flow into the step
// rows contain null title/link
// after: sanitize upstream
// add 'If field value is null' step mapping nulls to '' before RSS Output
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure required item values are non-null before they reach the step:
String title = row.getString("item_title");
if (title == null || title.isEmpty()) {
    throw new IllegalStateException("Item title is required for the feed");
}

Try / catch

try {
    transformation.execute();
} catch (KettleException e) {
    if (e.getMessage().contains("Error adding item to feed")) {
        log.error("Feed item construction failed; check channel init and null inputs", e);
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/25f1f104eb65476c. Report an issue: GitHub.

Appendix: source

Thrown at plugins/rss/impl/src/main/java/org/pentaho/di/trans/steps/rssoutput/RssOutput.java:523

      }
      if ( data.indexOfFielditempubdate > -1 ) {
        itemdatevalue = data.inputRowMeta.getDate( r, data.indexOfFielditempubdate );
      }
      if ( data.indexOfFielditemdescription > -1 ) {
        itemdescvalue = data.inputRowMeta.getString( r, data.indexOfFielditemdescription );
      }
      if ( data.indexOfFielditempointx > -1 ) {
        itemgeopointx = data.inputRowMeta.getString( r, data.indexOfFielditempointx );
      }
      if ( data.indexOfFielditempointy > -1 ) {
        itemgeopointy = data.inputRowMeta.getString( r, data.indexOfFielditempointy );
      }

      // Now add entry ..
      if ( !createEntry(
        itemauthorvalue, itemtitlevalue, itemlinkvalue, itemdatevalue, itemdescvalue, itemgeopointx,
        itemgeopointy ) ) {
        throw new KettleException( "Error adding item to feed" );
      }
    } else {

      // Set item tag at each row received
      if ( meta.isDisplayItem() ) {
        data.itemtag = data.channel.addElement( "item" );
      }
      for ( int i = 0; i < data.customitems.length; i++ ) {
        // get item value and name
        String itemname = environmentSubstitute( meta.getItemCustomTags()[i] );
        String itemvalue = data.inputRowMeta.getString( r, data.customitems[i] );

        if ( log.isDetailed() ) {
          logDetailed( "outputting item value <" + itemname + ">" + itemvalue + "<" + itemname + "/>" );
        }

        // add Item
        if ( meta.isDisplayItem() ) {

View on GitHub (pinned to f3058517a1)