[JIRA] [git-plugin] (JENKINS-29209) Exception when trying to use notifyCommit

13 views
Skip to first unread message

zmeggyesi@skawa.hu (JIRA)

unread,
Jul 3, 2015, 4:18:01 AM7/3/15
to jenkinsc...@googlegroups.com
Zalan Meggyesi created an issue
 
Jenkins / Bug JENKINS-29209
Exception when trying to use notifyCommit
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: git-plugin
Created: 03/Jul/15 8:17 AM
Environment: Debian 8, Jenkins 1.618, Git plugin 2.3.5
Priority: Major Major
Reporter: Zalan Meggyesi

When I try to use the notifyCommit endpoint to trigger a build, I get the following exception:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: jenkins/scm/api/SCMSourceOwners
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	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:745)
Caused by: java.lang.NoClassDefFoundError: jenkins/scm/api/SCMSourceOwners
	at jenkins.plugins.git.GitSCMSource$ListenerImpl.onNotifyCommit(GitSCMSource.java:157)
	at hudson.plugins.git.GitStatus.doNotifyCommit(GitStatus.java:80)
	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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	... 62 more

Is this a known issue, or something new?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 3, 2015, 5:05:01 PM7/3/15
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-29209
 
Re: Exception when trying to use notifyCommit

I've never seen anything like that in my use of notify commit. Can you narrow the cases where it occurs to a specific version of Jenkins?

I'm using 1.609.1 and recently performed a series of tests with Jenkins 1.617 without seeing that failure.

zmeggyesi@skawa.hu (JIRA)

unread,
Jul 4, 2015, 5:05:03 AM7/4/15
to jenkinsc...@googlegroups.com

I was fairly sure I entered that at creation time, but this specific stacktrace came up in Jenkins 1.618.

To be honest, I've only just started using the notifyCommit function, after upgrading Jenkins yesterday, so this error is news to me.

zmeggyesi@skawa.hu (JIRA)

unread,
Jul 15, 2015, 1:26:01 PM7/15/15
to jenkinsc...@googlegroups.com

Nicolas De Loof, Have you had any luck in investigating this? Do you need any more information from me?

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 15, 2015, 8:29:03 PM7/15/15
to jenkinsc...@googlegroups.com

Nicolas De Loof provided a possible fix for

JENKINS-21520 . The error message in that bug report is somewhat close to this error message (a class loading problem). If you're willing to try a version of the git client plugin very near to the upcoming 2.4.0 release, you could download build #707

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 15, 2015, 8:30:02 PM7/15/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29209
[~ndeloof] provided a possible fix for JENKINS-21520.  The error message in that bug report is somewhat close to this error message (a class loading problem).  If you're willing to try a version of the git client plugin very near to the upcoming 2.4.0 release, you could download [ git client plugin build #707|https://jenkins.ci.cloudbees.com/job/plugins/job/git-client-plugin/707/org.jenkins-ci.plugins$git-client/artifact/org.jenkins-ci.plugins/git-client/1.18.0-SNAPSHOT/git-client-1.18.0-SNAPSHOT.hpi]  and [git plugin build #862|https://jenkins.ci.cloudbees.com/job/plugins/job/git-plugin/862/org.jenkins-ci.plugins$git/artifact/org.jenkins-ci.plugins/git/2.3.6-SNAPSHOT/git-2.3.6-SNAPSHOT.hpi]

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 15, 2015, 10:33:01 PM7/15/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29209
[~ndeloof] provided a possible  fix  work around  for JENKINS-21520.  The error message in that bug report is somewhat close to this error message (a class loading problem).  If you're willing to try a version of the git client plugin very near to the upcoming 2.4.0 release, you could download [git client plugin build #707|https://jenkins.ci.cloudbees.com/job/plugins/job/git-client-plugin/707/org.jenkins-ci.plugins$git-client/artifact/org.jenkins-ci.plugins/git-client/1.18.0-SNAPSHOT/git-client-1.18.0-SNAPSHOT.hpi] and [git plugin build #862|https://jenkins.ci.cloudbees.com/job/plugins/job/git-plugin/862/org.jenkins-ci.plugins$git/artifact/org.jenkins-ci.plugins/git/2.3.6-SNAPSHOT/git-2.3.6-SNAPSHOT.hpi]

zmeggyesi@skawa.hu (JIRA)

unread,
Jul 16, 2015, 2:31:02 AM7/16/15
to jenkinsc...@googlegroups.com

Mark Waite Thank you, the two plugin snapshots you linked fixed the problem - I guess it was related to the 21520 issue. I'll be waiting for these to be merged into the stable release.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 18, 2015, 5:31:01 PM7/18/15
to jenkinsc...@googlegroups.com

The git plugin 2.4.0 release and the git client plugin 1.18.0 release happened today, 18 Jul 2015. You should see them in the Jenkins Update Center within the next 24 hours. They are already available as git.hpi and git-client-hpi from the Jenkins binary repository.

zmeggyesi@skawa.hu (JIRA)

unread,
Jul 20, 2015, 4:09:01 AM7/20/15
to jenkinsc...@googlegroups.com

Mark Waite Works perfectly, thank you! I guess this issue can be marked as resolved now.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 20, 2015, 7:02:02 AM7/20/15
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
 
Change By: Mark Waite
Status: Resolved Closed

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 20, 2015, 7:02:02 AM7/20/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

Resolved in git plugin 2.4.0 and git client plugin 1.18.0 released 18 Jul 2015

Change By: Mark Waite
Status: Open Resolved
Resolution: Fixed

zmeggyesi@skawa.hu (JIRA)

unread,
Mar 18, 2016, 3:36:03 AM3/18/16
to jenkinsc...@googlegroups.com
 
Re: Exception when trying to use notifyCommit

This seems to have re-surfaced as of git 2.4.2 and git-client 1.19.6, under Jenkins 1.653. I get the following stacktrace when trying to run a build from hook:

{{javax.servlet.ServletException: java.lang.NoClassDefFoundError: jenkins/scm/api/SCMSourceOwners


at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)

at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)


at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)

at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:134)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)


at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)

at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)

at jenkins.plugins.git.GitSCMSource$ListenerImpl.onNotifyCommit(GitSCMSource.java:158)
at hudson.plugins.git.GitStatus.doNotifyCommit(GitStatus.java:140)


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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)


at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
... 62 more}}

zmeggyesi@skawa.hu (JIRA)

unread,
Mar 18, 2016, 3:38:02 AM3/18/16
to jenkinsc...@googlegroups.com

Shall I open a new issue for this or re-open this one?

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 18, 2016, 12:22:01 PM3/18/16
to jenkinsc...@googlegroups.com

If you're confident it is the same stack trace, then reopen this issue. If it is a a different stack trace, open a new issue.

Please provide the configuration steps or changes needed to duplicate the issue.

zmeggyesi@skawa.hu (JIRA)

unread,
Mar 18, 2016, 1:06:04 PM3/18/16
to jenkinsc...@googlegroups.com
Zalan Meggyesi reopened an issue
 

Possible regression? The stack is the same, only the line numbers of the affected files differ.

Change By: Zalan Meggyesi
Resolution: Fixed
Status: Closed Reopened

zmeggyesi@skawa.hu (JIRA)

unread,
Mar 18, 2016, 1:06:05 PM3/18/16
to jenkinsc...@googlegroups.com
Zalan Meggyesi commented on Bug JENKINS-29209
 
Re: Exception when trying to use notifyCommit

The line numbers are different (that was to be expected, I guess), but the stack frames themselves are the same, according to a quick diff.

There were no config changes that I can see: I ran apt-get install jenkins to upgrade that package only, then ran the plugin upgrade for all plugin from within Jenkins, and after a restart, I tried the "test webhook" from within our Gitlab installation to verify operation, and that's when I encountered the error.
The server is running Debian GNU/Linux testing (stretch), though it may or may not factor into the issue.

I tried checking out the master branch for the scm-api plugin and the git-plugin, and building both locally, to no result: the scm-api plugin was verified to contain the offending class SCMSourceOwners, but nothing changed, while the git-plugin refused to build due to test failures in classes that had to do with the remote SCM polling and triggers (though I may not have prepared the build properly). I'm a little vague on this point, but I'm no longer near the dev machine to check the test reports again.

I hope I managed to help with the extra data, but if anything else is needed, I'll try to provide it.

gnewell@lutron.com (JIRA)

unread,
May 2, 2016, 11:44:01 AM5/2/16
to jenkinsc...@googlegroups.com

I am getting this stack trace returned to bit bucket when attempting to set up the web hooks to trigger builds. Just clicking on "test connection" will do it. Very repeatable. We need to get this working again as polling the bit bucket server from all our Jenkins instances is just too burdensome on our bit bucket server.

Is there are work around or something? We are trying to set up continuous integration builds and need to get this working. Please!
Jenkins 1.656, git plugin 2.4.4.

gnewell@lutron.com (JIRA)

unread,
May 3, 2016, 8:46:04 AM5/3/16
to jenkinsc...@googlegroups.com

Ok, so even thought the test connection fails and returns this mentioned stack trace (notifyCommit endpoint), the jobs do trigger, but fail with the "connection already closed" exception when starting up and attempting to inject the environment variables. I don't know if this is related to JENKINS-23852 or not. Just a coincidence that this issue was also re-opened in March? I donno.

[EnvInject] - Loading node environment variables.
ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: hudson.remoting.ChannelClosedException: channel is already closed
at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:75)
at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:81)
at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:39)
at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:572)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:492)
at hudson.model.Run.execute(Run.java:1738)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.remoting.ChannelClosedException: channel is already closed
at hudson.remoting.Channel.send(Channel.java:578)
at hudson.remoting.Request.call(Request.java:130)
at hudson.remoting.Channel.call(Channel.java:780)
at hudson.FilePath.act(FilePath.java:1074)
at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:44)
... 8 more

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:32:17 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages