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

Running the reverse migrator after upgrading to 1.597 throws NoClassDefFoundError: javax/servlet/http/HttpServletRequest

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      After upgrading to 1.597 from 1.588 on Windows

      • I cannot downgrade because trying to run the unmigrate script fails with:
        Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
                at hudson.Util.createSymlinkJava7(Util.java:1224)
                at hudson.Util.createSymlink(Util.java:1118)
                at jenkins.model.RunIdMigrator.unmigrateBuildsDir(RunIdMigrator.java:371
        )
                at jenkins.model.RunIdMigrator.unmigrateJobsDir(RunIdMigrator.java:320)
                at jenkins.model.RunIdMigrator.main(RunIdMigrator.java:307)
        Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
                at java.net.URLClassLoader$1.run(Unknown Source)
                at java.net.URLClassLoader$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                ... 5 more
        

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            A code path only run when you encounter a real error. Try locating the JAR containing the Servlet API (possibly %JENKINS_HOME%\war\winstone.jar, depending on how you start Jenkins), and adding that (after ;) to the -classpath used to run the unmigrator. If that fixes this problem, I will add this to the suggested command line.

            Show
            jglick Jesse Glick added a comment - A code path only run when you encounter a real error. Try locating the JAR containing the Servlet API (possibly %JENKINS_HOME%\war\winstone.jar , depending on how you start Jenkins), and adding that (after ; ) to the -classpath used to run the unmigrator. If that fixes this problem, I will add this to the suggested command line.
            Hide
            jglick Jesse Glick added a comment -

            Intentionally set summary to excerpt of error for easy tracking.

            Show
            jglick Jesse Glick added a comment - Intentionally set summary to excerpt of error for easy tracking.
            Hide
            dhlight David Light added a comment -

            Easy tracking if you happen to search for that specific portion of the error. That error is still searchable in the description and you've made it unreadable as a title

            Show
            dhlight David Light added a comment - Easy tracking if you happen to search for that specific portion of the error. That error is still searchable in the description and you've made it unreadable as a title
            Hide
            jglick Jesse Glick added a comment -

            Well this is the critical and identifying aspect of the error. There could be all sorts of unrelated problems running the reverse migrator.

            Show
            jglick Jesse Glick added a comment - Well this is the critical and identifying aspect of the error. There could be all sorts of unrelated problems running the reverse migrator.
            Hide
            sakshisood sakshi sood added a comment -

            I am also facing the same issue.

            Show
            sakshisood sakshi sood added a comment - I am also facing the same issue.
            Hide
            sakshisood sakshi sood added a comment - - edited

            I am downgrading the version from 2.7.4 to 1.580.3 on linux ,I have also faced the same error but below command resolved this error:

            java -classpath "/root/.jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar:/root/.jenkins/war/WEB-INF/commons-io-2.4.jar:/root/.jenkins/war/WEB-INF/lib/stapler-1.243.jar:/root/.jenkins/war/WEB-INF/lib/ant-1.8.4.jar:/root/.jenkins/war/WEB-INF/lib/commons-lang-2.6.jar:/root/.jenkins/war/winstone.jar" jenkins.model.RunIdMigrator "/root/.jenkins"

            But, after starting Jenkins 1.580.3 I still cannot see job history , any idea?

            Show
            sakshisood sakshi sood added a comment - - edited I am downgrading the version from 2.7.4 to 1.580.3 on linux ,I have also faced the same error but below command resolved this error: java -classpath "/root/.jenkins/war/WEB-INF/lib/jenkins-core-2.7.4.jar:/root/.jenkins/war/WEB-INF/commons-io-2.4.jar:/root/.jenkins/war/WEB-INF/lib/stapler-1.243.jar:/root/.jenkins/war/WEB-INF/lib/ant-1.8.4.jar:/root/.jenkins/war/WEB-INF/lib/commons-lang-2.6.jar:/root/.jenkins/war/winstone.jar" jenkins.model.RunIdMigrator "/root/.jenkins" But, after starting Jenkins 1.580.3 I still cannot see job history , any idea?

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                dhlight David Light
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: