{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/272","repository_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin","labels_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/272/comments","events_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/272/events","html_url":"https://github.com/jenkinsci/gitlab-plugin/issues/272","id":151221547,"number":272,"title":"Error while testing GitLab's Jenkins CI Integration with Jenkins' GitLab Plugin","user":{"login":"radium226","id":6315088,"avatar_url":"https://avatars.githubusercontent.com/u/6315088?v=3","gravatar_id":"","url":"https://api.github.com/users/radium226","html_url":"https://github.com/radium226","followers_url":"https://api.github.com/users/radium226/followers","following_url":"https://api.github.com/users/radium226/following{/other_user}","gists_url":"https://api.github.com/users/radium226/gists{/gist_id}","starred_url":"https://api.github.com/users/radium226/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radium226/subscriptions","organizations_url":"https://api.github.com/users/radium226/orgs","repos_url":"https://api.github.com/users/radium226/repos","events_url":"https://api.github.com/users/radium226/events{/privacy}","received_events_url":"https://api.github.com/users/radium226/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2016-04-26T19:40:42Z","updated_at":"2016-05-04T17:09:44Z","closed_at":null,"body":"Hello, \r\n\r\nI'm trying to make GitLab 8.7 (using directly https://gitlab.com) and Jenkins 2.0 work together, but I got this error from Jenkins when I test (using the Test button of GitLab's Jenkins CI Service interface): \r\n```\r\njava.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:320)\r\n\tat org.kohsuke.stapler.Function.bindAndInvoke(Function.java:163)\r\n\tat org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:378)\r\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)\r\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)\r\n\tat org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)\r\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)\r\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)\r\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)\r\n\tat org.kohsuke.stapler.Stapler.service(Stapler.java:238)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\r\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)\r\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)\r\n\tat hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)\r\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)\r\n\tat hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:49)\r\n\tat hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:44)\r\n\tat hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:106)\r\n\tat hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:44)\r\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)\r\n\tat hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)\r\n\tat hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat jenkins.security.BasicHeaderProcessor.success(BasicHeaderProcessor.java:140)\r\n\tat jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:82)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)\r\n\tat hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)\r\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\r\n\tat hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)\r\n\tat hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)\r\n\tat winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.NullPointerException\r\n\tat com.dabsquared.gitlabjenkins.webhook.ActionResolver.onPost(ActionResolver.java:93)\r\n\tat com.dabsquared.gitlabjenkins.webhook.ActionResolver.resolveAction(ActionResolver.java:53)\r\n\tat com.dabsquared.gitlabjenkins.webhook.ActionResolver.resolve(ActionResolver.java:47)\r\n\tat com.dabsquared.gitlabjenkins.webhook.GitLabWebHook.getDynamic(GitLabWebHook.java:44)\r\n\t... 73 more\r\n```\r\nI looked at the source code and it seems that the `X-GitLab-Event` is missing from the HTTP request. \r\n\r\nDo you guys have an idea what going on?"},"comment":{"url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/comments/216934652","html_url":"https://github.com/jenkinsci/gitlab-plugin/issues/272#issuecomment-216934652","issue_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/272","id":216934652,"user":{"login":"crussell52","id":375294,"avatar_url":"https://avatars.githubusercontent.com/u/375294?v=3","gravatar_id":"","url":"https://api.github.com/users/crussell52","html_url":"https://github.com/crussell52","followers_url":"https://api.github.com/users/crussell52/followers","following_url":"https://api.github.com/users/crussell52/following{/other_user}","gists_url":"https://api.github.com/users/crussell52/gists{/gist_id}","starred_url":"https://api.github.com/users/crussell52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crussell52/subscriptions","organizations_url":"https://api.github.com/users/crussell52/orgs","repos_url":"https://api.github.com/users/crussell52/repos","events_url":"https://api.github.com/users/crussell52/events{/privacy}","received_events_url":"https://api.github.com/users/crussell52/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T17:09:44Z","updated_at":"2016-05-04T17:09:44Z","body":"@coder-hugo Thank you for working on this and thank you for taking the time to clarify.  :)\r\n\r\nIt doesn't look like the GitLab `Jenkins CI` service (introduced in GitLab 8.3) has ever sent that header.  So, if I understand correctly, this means admins will have to choose one of three options:\r\n\r\n1. Upgrade their GitLab to latest version (after the GitLab fix goes in)\r\n2. Use an older version of this plugin (e.g. `1.1.32`)\r\n3. Integrate using `GitLab webhooks` instead of the `GitLab Jenkins CI` service \r\n\r\nIs that accurate?"}}