Skip to content
Latchkey

Jenkins "ClassNotFoundException" After Plugin Update

After a plugin update, Jenkins could not find a class a plugin or pipeline expected, raising ClassNotFoundException or NoClassDefFoundError.

What this error means

A build or the UI fails with java.lang.ClassNotFoundException naming a class, often right after upgrading or downgrading a plugin.

jenkins
java.lang.ClassNotFoundException: org.jenkinsci.plugins.old.LegacyStep
	at jenkins.util.AntClassLoader.findClassInComponents

Common causes

Class moved or removed

The updated plugin renamed or deleted a class that other code still references.

Missing dependency plugin

A plugin providing the class was not installed or loaded.

Stale serialized pipeline state

A resumed build references a class that no longer exists at the new version.

How to fix it

Align plugin versions

  1. Install the dependency that provides the missing class, or roll the plugin back to a compatible version.
  2. Restart Jenkins after changing plugins.

Clear stale resumable builds

  1. Abort and restart builds that were paused across the upgrade so they do not resume against removed classes.

How to prevent it

  • Test plugin upgrades on staging and avoid mixing plugin versions that reference classes removed across releases.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →