Search code examples
jenkinsjenkins-pluginsjenkins-workflow

Unreadable Data (CannotResolveClassException) in Jenkins


I'm using Jenkins 1.646. I keep getting Unreadable Data entries in the Manage Old Data section.

enter image description here

These entries appear for pretty much every build that occurs on my Freestyle projects. The builds complete just fine. Does anyone have any idea what I need to do to correct this? I did install the Pipeline plugin recently, and it installed a dozen or so other plugins with it, so my guess is that something is incompatible with my version of jenkins and / or another plugin I have installed.


Solution

  • I think I figured it out. I found out that VariableInjectionAction is a domain specific class inner class we are using in one of our build steps. We are dynamically loading its parent class to the classpath using the GroovyClassLoader for each build. It would seem that jenkins is trying to keep track of all the classes that are used to run our groovy scripts for a particular build, and since this is a dynamically-loaded inner class, jenkins is unable to find the class for archived builds, thus giving the error above.

    I assume the error would go away if we loaded our groovy scripts differently, e.g. pre-compiling them placing them on the root jenkins classpath. For now, since the builds are running fine, we'll probably just live with having to cleanup the unreadable data periodically.

    Also, this obviously didn't have anything to do with conflicts with recently installed plugins as I first thought.