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

Gradle class not found Servlet Exception prevents Configure Pages from loading

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core, gradle-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      After upgrading to jenkins-1.652-1.1.noarch, I get a ServletException error whenever I try to configure a job. This happens in both firefox and safari. When I downgrade jenkins to 1.651, this issue disappears.

      I've attached the Jenkins log, which seems to indicate that Gradle can't be found:

      WARNING: Caught exception evaluating: d.helpFile in /job/HFCS_Tools_SLOC/configure. Reason: java.lang.reflect.InvocationTargetException
      ...
      Caused by: java.lang.NoClassDefFoundError: hudson/plugins/gradle/Gradle
      ...
      

      The stack trace on the "Configure" error page (Screen Shot 2016-03-07 at 11.54.44 AM.png) mentions the ScmSyncConfigruationFilter and ScmSyncConfigurationDataProvider classes, so I figured this was an issue with the Scm-Sync-Configuration-Plugin.

        Attachments

          Issue Links

            Activity

            sotola Marek Sotola created issue -
            sotola Marek Sotola made changes -
            Field Original Value New Value
            Summary Grade class not found Servlet Exception prevents Configure Pages form loading Grade class not found Servlet Exception prevents Configure Pages from loading
            Hide
            jglick Jesse Glick added a comment -

            Daniel Beck suggests that the fix of JENKINS-25440 might have caused this. Is there a straightforward way to reproduce this from scratch? Messages in your log file during startup?

            Show
            jglick Jesse Glick added a comment - Daniel Beck suggests that the fix of JENKINS-25440 might have caused this. Is there a straightforward way to reproduce this from scratch? Messages in your log file during startup?
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-25440 [ JENKINS-25440 ]
            Hide
            jglick Jesse Glick added a comment -

            Nothing to do with the SCM Sync plugin. TBD whether a core bug, or something wrong with the Gradle plugin, or a configuration problem in your installation.

            Show
            jglick Jesse Glick added a comment - Nothing to do with the SCM Sync plugin. TBD whether a core bug, or something wrong with the Gradle plugin, or a configuration problem in your installation.
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            Component/s gradle-plugin [ 15547 ]
            Component/s scm-sync-configuration-plugin [ 15757 ]
            Assignee Frédéric Camblor [ fcamblor ]
            Hide
            jglick Jesse Glick added a comment -

            I ran a Jenkins dev build, installed the Gradle plugin, created a freestyle project, added a Gradle build step, saved, reconfigured. No exception.

            Show
            jglick Jesse Glick added a comment - I ran a Jenkins dev build, installed the Gradle plugin, created a freestyle project, added a Gradle build step, saved, reconfigured. No exception.
            Hide
            sfin Sven Finsterwalder added a comment -

            We have the same error after updating to 1.652:

            [#|2016-03-08T07:58:30.161+0100|WARNING|glassfish3.0.1|hudson.ExpressionFactory2$JexlExpression|_ThreadID=3621836;_ThreadName=Thread-1;|Caught exception evaluating: d.helpFile in /hudson/job/nightly-deploy-egb-edict/configure. Reason: java.lang.reflect.InvocationTargetException
            java.lang.reflect.InvocationTargetException
                    at sun.reflect.GeneratedMethodAccessor12621.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:606)
                    at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
                    at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
                    at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
                    at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
                    at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
                    at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
                    at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
                    at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
                    at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
            ...
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                    at java.lang.Thread.run(Thread.java:745)
            Caused by: java.lang.NoClassDefFoundError: hudson/plugins/gradle/Gradle
                    at java.lang.Class.getDeclaredMethods0(Native Method)
                    at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
                    at java.lang.Class.getDeclaredMethods(Class.java:1860)
                    at org.kohsuke.stapler.ClassDescriptor.findMethods(ClassDescriptor.java:148)
                    at org.kohsuke.stapler.ClassDescriptor.<init>(ClassDescriptor.java:84)
                    at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:106)
                    at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:94)
                    at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:203)
                    at org.kohsuke.stapler.jelly.groovy.GroovyFacet.createRequestDispatcher(GroovyFacet.java:106)
                    at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:255)
                    at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:250)
                    at hudson.model.Descriptor.getHelpFile(Descriptor.java:744)
                    at hudson.model.Descriptor.getHelpFile(Descriptor.java:726)
                    at hudson.model.Descriptor.getHelpFile(Descriptor.java:715)
                    ... 163 more
            Caused by: java.lang.ClassNotFoundException: hudson.plugins.gradle.Gradle
                    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
                    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
                    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
                    ... 177 more
            |#]
            
            
            Show
            sfin Sven Finsterwalder added a comment - We have the same error after updating to 1.652: [#|2016-03-08T07:58:30.161+0100|WARNING|glassfish3.0.1|hudson.ExpressionFactory2$JexlExpression|_ThreadID=3621836;_ThreadName= Thread -1;|Caught exception evaluating: d.helpFile in /hudson/job/nightly-deploy-egb-edict/configure. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor12621.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314) at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185) at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74) ... at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang. Thread .run( Thread .java:745) Caused by: java.lang.NoClassDefFoundError: hudson/plugins/gradle/Gradle at java.lang. Class .getDeclaredMethods0(Native Method) at java.lang. Class .privateGetDeclaredMethods( Class .java:2615) at java.lang. Class .getDeclaredMethods( Class .java:1860) at org.kohsuke.stapler.ClassDescriptor.findMethods(ClassDescriptor.java:148) at org.kohsuke.stapler.ClassDescriptor.<init>(ClassDescriptor.java:84) at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:106) at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:94) at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:203) at org.kohsuke.stapler.jelly.groovy.GroovyFacet.createRequestDispatcher(GroovyFacet.java:106) at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:255) at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:250) at hudson.model.Descriptor.getHelpFile(Descriptor.java:744) at hudson.model.Descriptor.getHelpFile(Descriptor.java:726) at hudson.model.Descriptor.getHelpFile(Descriptor.java:715) ... 163 more Caused by: java.lang.ClassNotFoundException: hudson.plugins.gradle.Gradle at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) at java.lang. ClassLoader .loadClass( ClassLoader .java:358) ... 177 more |#]
            sotola Marek Sotola made changes -
            Summary Grade class not found Servlet Exception prevents Configure Pages from loading Gradle class not found Servlet Exception prevents Configure Pages from loading
            Hide
            sotola Marek Sotola added a comment -

            I searched through /var/lib/jenkins for Gradle/gradle, and it looked like the only place gradle was mentioned in the file name was the artifactory plugin. So I disabled the Artifactory Plugin, restarted Jenkins (1.652), and then went to a job's configure page, and the issue went away (there were a few permission errors related to the artifactory plugin no longer existing on startup).
            I then dug into this a little more, and it turns out that the Gradle (1.24) plugin was never installed on my Jenkins machine. I installed it, re-enabled the artifactory plugin, and then went to a Job's configure page... and everything worked.
            I've also posted this issue on the JFrog Artifactory Plugin JIRA at: https://www.jfrog.com/jira/browse/HAP-699
            Jesse Glick Thanks for your help!
            Sven Finsterwalder Is the Gradle plugin installed on your Jenkins instance?

            Show
            sotola Marek Sotola added a comment - I searched through /var/lib/jenkins for Gradle/gradle, and it looked like the only place gradle was mentioned in the file name was the artifactory plugin. So I disabled the Artifactory Plugin, restarted Jenkins (1.652), and then went to a job's configure page, and the issue went away (there were a few permission errors related to the artifactory plugin no longer existing on startup). I then dug into this a little more, and it turns out that the Gradle (1.24) plugin was never installed on my Jenkins machine. I installed it, re-enabled the artifactory plugin, and then went to a Job's configure page... and everything worked. I've also posted this issue on the JFrog Artifactory Plugin JIRA at: https://www.jfrog.com/jira/browse/HAP-699 Jesse Glick Thanks for your help! Sven Finsterwalder Is the Gradle plugin installed on your Jenkins instance?
            Hide
            jglick Jesse Glick added a comment -

            Possible dupe of JENKINS-21486 then?

            Show
            jglick Jesse Glick added a comment - Possible dupe of JENKINS-21486 then?
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-21486 [ JENKINS-21486 ]
            danielbeck Daniel Beck made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Not A Defect [ 7 ]
            Hide
            sotola Marek Sotola added a comment -

            Possibly: I only noticed the issue when I was upgrading Jenkins, so I'm not 100% sure if it is a duplicate or if something else triggered the issue.

            Show
            sotola Marek Sotola added a comment - Possibly: I only noticed the issue when I was upgrading Jenkins, so I'm not 100% sure if it is a duplicate or if something else triggered the issue.
            Hide
            hicolour Marek Prochera added a comment -

            Workaround

            1. Install gradle

            Unable to find source-code formatter for language: jbash. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
            sudo add-apt-repository ppa:cwchien/gradle
            sudo apt-get update
            sudo apt-get install gradle
            

            2. install Gradle plugin

            Show
            hicolour Marek Prochera added a comment - Workaround 1. Install gradle Unable to find source-code formatter for language: jbash. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml sudo add-apt-repository ppa:cwchien/gradle sudo apt-get update sudo apt-get install gradle 2. install Gradle plugin
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169270 ] JNJira + In-Review [ 198570 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                sotola Marek Sotola
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: