reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
45 stars 37 forks source link

Unable to activate plugin in bitbucket 6.10.3 #115

Closed dzwicker closed 4 years ago

dzwicker commented 4 years ago

Error is

2020-06-10 14:22:39,737 ERROR [ThreadPoolAsyncTaskExecutor::Thread 74]  o.e.g.b.e.i.d.s.DependencyWaiterApplicationContextExecutor Unable to create application context for [com.ngs.stash.externalhooks.external-hooks], unsatisfied dependencies: none
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://147.0:0/META-INF/spring/plugin-context.xml]; nested exception is java.lang.IllegalStateException: Bundle is uninstalled
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:419)
    at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:171)
    at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:141)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:636)
    at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:57)
    at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:239)
    at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:217)
    at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:224)
    at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:177)
    at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:154)
    at org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager$1.run(LifecycleManager.java:213)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.lang.Thread.run(Thread.java:748)
    ... 6 frames trimmed
Caused by: java.lang.IllegalStateException: Bundle is uninstalled
    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1896)
    at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:136)
    at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:212)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:275)
    at org.eclipse.gemini.blueprint.extender.internal.support.NamespacePlugins$Plugin.resolve(NamespacePlugins.java:77)
    at org.eclipse.gemini.blueprint.extender.internal.support.NamespacePlugins$5.operate(NamespacePlugins.java:209)
    at org.eclipse.gemini.blueprint.extender.internal.support.NamespacePlugins$5.operate(NamespacePlugins.java:205)
    at org.eclipse.gemini.blueprint.extender.internal.support.LazyBundleRegistry.apply(LazyBundleRegistry.java:159)
    at org.eclipse.gemini.blueprint.extender.internal.support.NamespacePlugins.doResolve(NamespacePlugins.java:205)
    at org.eclipse.gemini.blueprint.extender.internal.support.NamespacePlugins.resolve(NamespacePlugins.java:169)
    at org.eclipse.gemini.blueprint.context.support.TrackingUtil$OsgiServiceHandler.invoke(TrackingUtil.java:106)
    at org.eclipse.gemini.blueprint.context.support.DelegatedNamespaceHandlerResolver.resolve(DelegatedNamespaceHandlerResolver.java:55)
    ... 15 common frames omitted
seletskiy commented 4 years ago

Hello.

It is a known issue in Bitbucket. The following solution should clear this issue:

Please let me know if it helps or not.

seletskiy commented 4 years ago

Maybe @bturner could provide more info. This is not the first time described problem appears.

dzwicker commented 4 years ago

Installed Plugin version: 10.2.1 The Universal Plugin Manager (v4.0.13) by Atlassian Bitbucket: 6.10.3 (docker image)

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS               NAMES
8a8cd5f2d64e        atlassian/bitbucket-server:6.10.3   "/sbin/tini -- /entr…"   7 minutes ago       Up 7 minutes                            bitbucket.service
bturner commented 4 years ago

I'm not aware of any specific issues around this (which isn't to say there isn't one). If there are, they'd be in Atlassian Plugins, a framework around OSGi/Felix/Spring, rather than directly in Bitbucket Server itself. What we really need in order to pursue this is a reproduction recipe so we can trigger the failure ourselves and gather more information about the system's state when it happens.

I'll mention this to the team that deals more directly with the plugin framework and see if they have any ideas. Otherwise, if someone can come up with a reliable, or quasi-reliable, reproduction, that would be a big help.

Best regards, Bryan Turner Atlassian Bitbucket

dzwicker commented 4 years ago

Perhaps another hint. I have uploaded by hand and this fails.

kovetskiy commented 4 years ago

@dzwicker yikes, we still can't reproduce the issue on any other instances. Could you try to restart Bitbucket?

dzwicker commented 4 years ago

Restart after deleting the osgi cache did the job 👍🏻