Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12124

random NoClassDefFoundError: hudson/plugins/analysis/core/AbstractProjectAction - Not all jobs loaded

    Details

    • Similar Issues:

      Description

      It sometimes happens, that upon fresh start of tomcat, not all Jobs/Projects are loaded.
      Once logging in and clicking on "reload configuration from disk" this works w/o any error and all the missing jobs are there.
      It seems to be random... and on another restart some other jobs are missing...
      Any clue?

      INFO: Started all plugins
      Dec 16, 2011 9:14:36 AM jenkins.InitReactorRunner$1 onAttained
      INFO: Augmented all extensions
      Dec 16, 2011 9:14:59 AM jenkins.InitReactorRunner$1 onTaskFailed
      SEVERE: Failed Loading job XXXXXX
      java.lang.NoClassDefFoundError: hudson/plugins/analysis/core/AbstractProjectAction
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at hudson.plugins.checkstyle.CheckStylePublisher.getProjectAction(CheckStylePublisher.java:128)
      at hudson.tasks.BuildStepCompatibilityLayer.getProjectActions(BuildStepCompatibilityLayer.java:73)
      at hudson.model.Project.createTransientActions(Project.java:208)
      at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:602)
      at hudson.model.AbstractProject.onLoad(AbstractProject.java:272)
      at hudson.model.Project.onLoad(Project.java:88)
      at hudson.model.Items.load(Items.java:115)
      at jenkins.model.Jenkins$14.run(Jenkins.java:2364)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      at jenkins.model.Jenkins$5.runTask(Jenkins.java:804)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.ClassNotFoundException: hudson.plugins.analysis.core.AbstractProjectAction
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 27 more
      Dec 16, 2011 9:15:19 AM jenkins.InitReactorRunner$1 onAttained
      INFO: Loaded all jobs
      Dec 16, 2011 9:15:19 AM jenkins.InitReactorRunner$1 onAttained
      INFO: Completed initialization

        Attachments

          Issue Links

            Activity

            Hide
            gotwarlost Krishnan Anantheswaran added a comment -

            Root cause is a sychronization issue in Jenkins classloading. Explanation here: https://github.com/gotwarlost/jenkins-classloader

            Show
            gotwarlost Krishnan Anantheswaran added a comment - Root cause is a sychronization issue in Jenkins classloading. Explanation here: https://github.com/gotwarlost/jenkins-classloader
            Hide
            gotwarlost Krishnan Anantheswaran added a comment -

            Thank you for looking into this issue with high priority. Hope to see a fix on LTS soon

            Show
            gotwarlost Krishnan Anantheswaran added a comment - Thank you for looking into this issue with high priority. Hope to see a fix on LTS soon
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/ClassicPluginStrategy.java
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/jenkins/ClassLoaderReflectionToolkit.java
            http://jenkins-ci.org/commit/jenkins/898f1f76a37e1c69cf38df718a5d3899544ebb44
            Log:
            [FIXED JENKINS-12124] Occasionally errors loading plugin classes since it is expected that findClass (and findLoadedClass) are called under synchronization.
            The problem was masked by a blind assumption that an InvocationTargetException was in fact wrapping a ClassNotFoundException.
            Many thanks to @gotwarlost for demonstrating how to reproduce the problem and diagnosing the cause.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/java/hudson/PluginManager.java core/src/main/java/jenkins/ClassLoaderReflectionToolkit.java http://jenkins-ci.org/commit/jenkins/898f1f76a37e1c69cf38df718a5d3899544ebb44 Log: [FIXED JENKINS-12124] Occasionally errors loading plugin classes since it is expected that findClass (and findLoadedClass) are called under synchronization. The problem was masked by a blind assumption that an InvocationTargetException was in fact wrapping a ClassNotFoundException. Many thanks to @gotwarlost for demonstrating how to reproduce the problem and diagnosing the cause.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3192
            [FIXED JENKINS-12124] Occasionally errors loading plugin classes since it is expected that findClass (and findLoadedClass) are called under synchronization. (Revision 898f1f76a37e1c69cf38df718a5d3899544ebb44)

            Result = SUCCESS
            Jesse Glick : 898f1f76a37e1c69cf38df718a5d3899544ebb44
            Files :

            • core/src/main/java/hudson/PluginManager.java
            • core/src/main/java/jenkins/ClassLoaderReflectionToolkit.java
            • changelog.html
            • core/src/main/java/hudson/ClassicPluginStrategy.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3192 [FIXED JENKINS-12124] Occasionally errors loading plugin classes since it is expected that findClass (and findLoadedClass) are called under synchronization. (Revision 898f1f76a37e1c69cf38df718a5d3899544ebb44) Result = SUCCESS Jesse Glick : 898f1f76a37e1c69cf38df718a5d3899544ebb44 Files : core/src/main/java/hudson/PluginManager.java core/src/main/java/jenkins/ClassLoaderReflectionToolkit.java changelog.html core/src/main/java/hudson/ClassicPluginStrategy.java
            Hide
            olivergondza Oliver Gondža added a comment -

            Fixed in 1.554. No need to backport.

            Show
            olivergondza Oliver Gondža added a comment - Fixed in 1.554. No need to backport.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                myron Myron Boyle
              • Votes:
                21 Vote for this issue
                Watchers:
                27 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: