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

git userContent plugin is broken, reports class not found exception in log

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-usercontent-plugin
    • Labels:
      None
    • Environment:
      Debian Wheezy
      Jenkins 1.532.1
      git-server plugin 1.3
      git-userContent plugin 1.4-SNAPSHOT
    • Similar Issues:

      Description

      The JENKINS-21163 fix has allowed the Jenkins server to start and run when the git-server plugin is installed. However, attempting to use the git-userContent plugin fails with a 404 error when opening http://localhost:8080/userContent.git . A class not found exception is reported in the Jenkins log, noting that a jar file may need to be rebuilt.

      Feb 10, 2014 9:04:45 PM hudson.ExtensionFinder$Sezpoz _find
      WARNING: Failed to load org.jenkinsci.plugins.gitUserContent.GitUserContentRepositorySSHAccess
      java.lang.InstantiationException: /var/lib/jenkins/plugins/git-userContent/WEB-INF/lib/classes.jar might need to be rebuilt: java.lang.ClassNotFoundException: org.jenkinsci.plugins.gitUserContent.GitUserContentRepositorySSHAccess
              at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
              at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:628)
              at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:617)
              at hudson.ExtensionFinder._find(ExtensionFinder.java:151)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:316)
              at hudson.ExtensionList.load(ExtensionList.java:295)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
              at hudson.ExtensionList.iterator(ExtensionList.java:138)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:309)
              at hudson.ExtensionList.load(ExtensionList.java:295)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
              at hudson.ExtensionList.iterator(ExtensionList.java:138)
              at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1187)
              at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1404)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
              at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
              at jenkins.model.Jenkins$7.runTask(Jenkins.java:899)
              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.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.gitUserContent.GitUserContentRepositorySSHAccess
              at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:985)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
              at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
              ... 26 more
      

      I was using a snapshot build of the git-userContent plugin so that I could update its dependencies to match the git-server plugin dependencies.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          http://jenkins-ci.org/commit/git-server-plugin/4c729a1864f32ce7c8444c4af251e31c7b8a4859
          Log:
          [FIXED JENKINS-21756]
          Decouple this from git plugin

          ... so that this plugin won't pick up jgit from git-client plugin.

          git-client plugin updates its jgit plugin at its own pace, and if that
          gets inconsistent with the jgit version git-server plugin uses, lots of
          LinkageErrors and NoClassDefFoundError ensues.

          Either we need to keep those two copies independent like this, or we
          should just bundle jgit HTTP server jar into the base git-client plugin.

          It only adds like 90KB on top of jgit core that's already 1.9MB, so it's
          quite feasible

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml http://jenkins-ci.org/commit/git-server-plugin/4c729a1864f32ce7c8444c4af251e31c7b8a4859 Log: [FIXED JENKINS-21756] Decouple this from git plugin ... so that this plugin won't pick up jgit from git-client plugin. git-client plugin updates its jgit plugin at its own pace, and if that gets inconsistent with the jgit version git-server plugin uses, lots of LinkageErrors and NoClassDefFoundError ensues. Either we need to keep those two copies independent like this, or we should just bundle jgit HTTP server jar into the base git-client plugin. It only adds like 90KB on top of jgit core that's already 1.9MB, so it's quite feasible
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          http://jenkins-ci.org/commit/git-userContent-plugin/fd1b53237f2c34fe40374dcacf4e1cf4be3f2ef5
          Log:
          Bumping up the version in an attempt to reproduce JENKINS-21756

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml http://jenkins-ci.org/commit/git-userContent-plugin/fd1b53237f2c34fe40374dcacf4e1cf4be3f2ef5 Log: Bumping up the version in an attempt to reproduce JENKINS-21756
          Hide
          markewaite Mark Waite added a comment -

          I think it is quite reasonable to add the JGit http server jar into the git-client-plugin. Should I attempt that, or do you have time to make that change to git-client-plugin?

          With the recent release of JGit 3.5.1, I think we are nearing time to release git-client-plugin 1.11.0, and that seems like a good time to add the jgit HTTP server jar into the plugin.

          Show
          markewaite Mark Waite added a comment - I think it is quite reasonable to add the JGit http server jar into the git-client-plugin. Should I attempt that, or do you have time to make that change to git-client-plugin? With the recent release of JGit 3.5.1, I think we are nearing time to release git-client-plugin 1.11.0, and that seems like a good time to add the jgit HTTP server jar into the plugin.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          pom.xml
          http://jenkins-ci.org/commit/git-client-plugin/138f276dcf46b4193aea3164ba80acdfb541945f
          Log:
          Include jgit http server jar in git-client-plugin for API consumers

          JENKINS-21756 shows that JGit version mismatches can complicate the
          management of plugins. Including JGit http server in this plugin is
          hoped to reduce the version mismatch cases.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: pom.xml http://jenkins-ci.org/commit/git-client-plugin/138f276dcf46b4193aea3164ba80acdfb541945f Log: Include jgit http server jar in git-client-plugin for API consumers JENKINS-21756 shows that JGit version mismatches can complicate the management of plugins. Including JGit http server in this plugin is hoped to reduce the version mismatch cases.
          Hide
          markewaite Mark Waite added a comment -

          Confirmed that I can clone from git clone http://mark-pc1:8080/userContent.git after installing git-userContent 1.4 (and git-client 1.11.0)

          Show
          markewaite Mark Waite added a comment - Confirmed that I can clone from git clone http://mark-pc1:8080/userContent.git after installing git-userContent 1.4 (and git-client 1.11.0)

            People

            • Assignee:
              Unassigned
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: