ClassNotFoundException During Build of a Maven Job

Article ID:204754550
1 minute readKnowledge base

Issue

Running a maven job causes a ClassNotFoundException

Environment

  • CloudBees Jenkins Enterprise - Managed controller (CJEMM)

  • CloudBees Jenkins Enterprise- Operations Center (CJEOC)

  • CloudBees Jenkins Team (CJT)

  • CloudBees Jenkins Platform - Client controller (CJPCM)

  • CloudBees Jenkins Platform - Operations Center (CJPOC)

  • Jenkins

Diagnostic

In the console output of the job it shows:

Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher

Resolution

Ensure that the agent.jar file is not removed or deleted from the agent machine during the clean up step of the build.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.