mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 100 forks source link

Error attempting to load plugin (Stash 3.3.0) #137

Open mandrachek opened 8 years ago

mandrachek commented 8 years ago

Tried upgradin on Stash 3.3.0, and I cannot enable the plugin. Here's what I get in the logs:

2015-07-27 11:30:53,674 INFO  [http-nio-443-exec-37] andrachekm @UNWEPOx690x689444x0 wmbx76 192.168.2.225 "PUT /rest/plugins/1.0/com.nerdwin15.stash-stash-webhook-jenkins-key HTTP/1.1" c.a.plugin.manager.PluginEnabler Enabling 1 plugins: [com.nerdwin15.stash-stash-webhook-jenkins]
2015-07-27 11:30:53,674 INFO  [http-nio-443-exec-37] andrachekm @UNWEPOx690x689444x0 wmbx76 192.168.2.225 "PUT /rest/plugins/1.0/com.nerdwin15.stash-stash-webhook-jenkins-key HTTP/1.1" c.a.plugin.manager.PluginEnabler Plugin 'com.nerdwin15.stash-stash-webhook-jenkins' immediately ENABLED
2015-07-27 11:30:53,698 INFO  [http-nio-443-exec-37] andrachekm @UNWEPOx690x689444x0 wmbx76 192.168.2.225 "PUT /rest/plugins/1.0/com.nerdwin15.stash-stash-webhook-jenkins-key HTTP/1.1" c.a.p.o.f.ModuleDescriptorServiceTrackerCustomizer Dynamically registered new module descriptor: com.nerdwin15.stash-stash-webhook-jenkins:jenkins-rest-filter
2015-07-27 11:30:53,723 INFO  [http-nio-443-exec-37] andrachekm @UNWEPOx690x689444x0 wmbx76 192.168.2.225 "PUT /rest/plugins/1.0/com.nerdwin15.stash-stash-webhook-jenkins-key HTTP/1.1" c.a.p.o.f.ModuleDescriptorServiceTrackerCustomizer Dynamically registered new module descriptor: com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook-config-form
2015-07-27 11:30:53,756 ERROR [http-nio-443-exec-37] andrachekm @UNWEPOx690x689444x0 wmbx76 192.168.2.225 "PUT /rest/plugins/1.0/com.nerdwin15.stash-stash-webhook-jenkins-key HTTP/1.1" c.a.p.manager.DefaultPluginManager There was an error loading the descriptor 'Stash Webhook to Jenkins' of plugin 'com.nerdwin15.stash-stash-webhook-jenkins'. Disabling.
java.lang.NullPointerException: null
    at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:32) ~[ClassPrefixModuleFactory.class:na]
    at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java:100) ~[PrefixDelegatingModuleFactory.class:na]
    at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<generated>) ~[ReflectUtils.class:na]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.0.6.RELEASE]
    at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiSafeProxyProvider$1.class:na]
    at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$8f2d202a.createModule(<generated>) ~[ReflectUtils.class:na]
    at com.atlassian.stash.internal.plugin.RepositoryHookModuleDescriptor.enabled(RepositoryHookModuleDescriptor.java:145) ~[RepositoryHookModuleDescriptor.class:na]
    at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1959) [DefaultPluginManager.class:na]
    at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1750) [DefaultPluginManager.class:na]
    at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1720) [DefaultPluginManager.class:na]
    at com.atlassian.plugin.manager.DefaultPluginManager.notifyPluginEnabled(DefaultPluginManager.java:1698) [DefaultPluginManager.class:na]
    at com.atlassian.plugin.manager.DefaultPluginManager.enablePlugins(DefaultPluginManager.java:1670) [DefaultPluginManager.class:na]
    at com.atlassian.stash.internal.plugin.ClusteredPluginController.enablePlugins(ClusteredPluginController.java:54) [ClusteredPluginController.class:na]
    at com.atlassian.upm.core.impl.PluginEnablementServiceImpl$1.doInTransaction(PluginEnablementServiceImpl.java:87) [plugin.5006126166494303997.atlassian-universal-plugin-manager-plugin-2.19.1_1438008523719.jar:na]
    at com.atlassian.upm.core.impl.PluginEnablementServiceImpl$1.doInTransaction(PluginEnablementServiceImpl.java:63) [plugin.5006126166494303997.atlassian-universal-plugin-manager-plugin-2.19.1_1438008523719.jar:na]
    at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) [HostContextTransactionTemplate$1.class:na]
    at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:27) [HostContextAccessorImpl.class:na]
    at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) [HostContextTransactionTemplate.class:na]
    at com.atlassian.upm.core.impl.PluginEnablementServiceImpl.enablePlugin(PluginEnablementServiceImpl.java:62) [plugin.5006126166494303997.atlassian-universal-plugin-manager-plugin-2.19.1_1438008523719.jar:na]
    at com.atlassian.upm.core.rest.resources.PluginResource.put(PluginResource.java:122) [plugin.5006126166494303997.atlassian-universal-plugin-manager-plugin-2.19.1_1438008523719.jar:na]
    at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.2.4_1408643294000.jar:na]
    at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) [StashAuthenticationFilter.class:na]
    at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) [BeforeLoginPluginAuthenticationFilter.class:na]
    at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) [BeforeLoginPluginAuthenticationFilter.class:na]
    at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [TrustedApplicationsFilter.class:na]
    at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) [atlassian-oauth-service-provider-plugin-1.9.2_1408643294000.jar:na]
    at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) [analytics-client-3.40_1408643294000.jar:na]
    at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) [AbstractHttpFilter.class:na]
    at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) [BeforeLoginPluginAuthenticationFilter.class:na]
    at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na]
    at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:81) [DefaultRequestManager.class:na]
    at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:450) [WebFilter.class:3.3-RC3]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
    ... 287 frames trimmed
mikesir87 commented 8 years ago

And this occurred while trying to update to the current version? What version were you running previously?

mandrachek commented 8 years ago

Yes. Trying to upgrade to 2.7.0 (current version) from 2.6.0 (previous version).

ashnazg commented 8 years ago

I'd been waiting for a chance to enable the debug mode in order to get better details, but I haven't yet been able to get my admin to do so...

We also see failure when trying to enable 2.7.0 up from 2.6.0, though it's a different stack trace (and older Stash v2.12.1).

c.a.plugin.osgi.factory.OsgiPlugin Unable to start the plugin container for plugin com.nerdwin15.stash-stash-webhook-jenkins
java.lang.NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method) ~[na:1.7.0_51]
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493) ~[na:1.7.0_51]
        at java.lang.Class.getConstructors(Class.java:1517) ~[na:1.7.0_51]
        at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
        at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
        at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_51]
        at java.lang.Thread.run(Thread.java:744) ~[na:1.7.0_51]
...
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.scheme.SchemeSocketFactory not found by org.apache.httpcomponents.httpclient [18]
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787) ~[org.apache.felix.framework-3.0.9.jar:na]
dkoryavov commented 8 years ago

The same problem for me. I tried to install plugin (v 2.7.0) on a fresh Stash instance (v.3.3.0) and got the same error. I can install the previous version of a plugin without any problems.

mandrachek commented 8 years ago

I upgraded to Stash 3.11.1, and the plugin (v 2.7.0) works again. Unfortunately it appears that my links with jira have broken (diagnostics says everything is fine, but no issues are transitioned in jira, sigh.)

ashnazg commented 8 years ago

The same NoClassDefFoundError for SchemeSocketFactory occurs when trying to enable v2.7.1 in our Stash v2.12.1 instance.

Is it possible that the minimum supported Stash version is now higher due to some enhancement since 2.4.0?

randywvt commented 8 years ago

Solved for me: Stash 3.3.0 Plugin versions 2.7.1 and 2.7.0 didn't work as the previous posters reported. I installed version 2.6.0 and it works.

thibomfim commented 8 years ago

I am supporting Stash for Atlassian and I've got another customer that downgraded and got it back working jast like @randywvt reported.