pentaho/pentaho-kettle · error · KettleException

RepositoryMeta.Error.ReadingInfo

Error message

RepositoryMeta.Error.ReadingInfo

What it means

RepositoriesMeta.readData throws KettleException with RepositoryMeta.Error.ReadingInfo as a catch-all when parsing repositories.xml fails (parseRepositoriesDoc or the DocumentBuilder parse throws) — the file exists but its content is unreadable or invalid. The cause is chained.

Solutions

  1. Inspect e.getCause() for the exact parse error (line/column from the XML parser)
  2. Validate repositories.xml against expected <repositories><repository>...</repository></repositories> structure
  3. Fix encoding declaration to match the file's actual encoding
  4. Regenerate the file via Spoon or restore a backup

Example fix

// before: malformed XML
<repositories><repository><name>prod</name></repositories>
// after
<?xml version="1.0" encoding="UTF-8"?>
<repositories><repository><id>KettleDatabaseRepository</id><name>prod</name></repository></repositories>
Defensive patterns

Strategy: validation

Validate before calling

// Validate XML parses before handing to RepositoriesMeta
javax.xml.parsers.DocumentBuilderFactory f = javax.xml.parsers.DocumentBuilderFactory.newInstance();
f.setValidating(false);
try {
  f.newDocumentBuilder().parse(repoXmlFile);
} catch (Exception ex) {
  throw new IllegalStateException("repositories.xml is not well-formed: " + ex.getMessage(), ex);
}

Type guard

static boolean isWellFormedXml(java.io.File f) {
  try { javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(f); return true; }
  catch (Exception e) { return false; }
}

Try / catch

try {
  reposMeta.readData(file);
} catch (KettleException e) {
  if (e.getMessage() != null && e.getMessage().endsWith("ReadingInfo")) {
    throw new IllegalStateException("repositories.xml unreadable/invalid: " + e.getCause(), e);
  }
  throw e;
}

Prevention

When it happens

Trigger: parseRepositoriesDoc(doc) receiving a null doc, or db.parse throwing on malformed XML inside the try block — anything after the file is opened that throws Exception.

Common situations: Corrupted or truncated repositories.xml; XML with wrong encoding (e.g. UTF-16 file read as UTF-8); root element not <repositories>; XML entities/namespace surprises from manual editing.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/RepositoriesMeta.java:217

    try {
      // Check and open XML document
      DocumentBuilderFactory dbf = XMLParserFactoryProducer.createSecureDocBuilderFactory();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc;
      try {
        doc = db.parse( file );
      } catch ( FileNotFoundException ef ) {
        try ( InputStream is = getClass().getResourceAsStream( "/org/pentaho/di/repository/repositories.xml" ) ) {
          if ( is != null ) {
            doc = db.parse( is );
          } else {
            throw new KettleException( BaseMessages.getString( PKG, "RepositoryMeta.Error.OpeningFile", file.getAbsoluteFile() ), ef );
          }
        }
      }
      parseRepositoriesDoc( doc );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "RepositoryMeta.Error.ReadingInfo" ), e );
    }

    return true;
  }

  public String getKettleUserRepositoriesFile() {
    return Const.getKettleUserRepositoriesFile();
  }

  String getKettleLocalRepositoriesFile() {
    return Const.getKettleLocalRepositoriesFile();
  }

  public void readDataFromInputStream( InputStream is ) throws KettleException {
    // Clear the information
    //
    clear();

View on GitHub (pinned to f3058517a1)