Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to build and upload CSE plugin in Bitbucket? Edited

Hi,

Could anyone please let me know how to build and deploy the CSE plugin in Bitbucket? I cloned this repo bitbucket-client-side-extensions-template and added my code to it. When I tested in my local, it works fine. I build and package it using two commands


npm run-script build:prod
atlas-package

It works when I run it using the ```atlas-run``` command in my local.

But if I deployed the jar to Bitbucket, it is failing with the below error

> 2020-12-18 10:16:08,908 WARN [UpmAsynchronousTaskManager:thread-1] aswadm *1RYH7I3x616x10439x10 m6fzw6 172.27.115.5,127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.plugin.impl.AbstractPlugin Because of this exception> com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.demo.cse-scripts> at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)> at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:252)> at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)> at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:97)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$enableDependentPlugins$22(DefaultPluginManager.java:1243)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1227)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$addPlugins$20(DefaultPluginManager.java:1212)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1112)> at com.atlassian.stash.internal.plugin.StashPluginManager.addPlugins(StashPluginManager.java:79)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$scanForNewPlugins$12(DefaultPluginManager.java:917)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:872)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$installPlugins$11(DefaultPluginManager.java:832)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:818)> at com.atlassian.stash.internal.plugin.ClusteredPluginController.installPlugins(ClusteredPluginController.java:77)> at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)> at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:139)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:134)> at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)> at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:54)> at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)> at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)> at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifacts(AbstractPluginInstallHandler.java:133)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifact(AbstractPluginInstallHandler.java:119)> at com.atlassian.upm.core.install.JarPluginInstallHandler.installPluginInternal(JarPluginInstallHandler.java:52)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installPlugin(AbstractPluginInstallHandler.java:60)> at com.atlassian.upm.core.install.DefaultPluginInstallationService.execute(DefaultPluginInstallationService.java:133)> at com.atlassian.upm.core.install.DefaultPluginInstallationService.install(DefaultPluginInstallationService.java:101)> at com.atlassian.upm.install.UpmPluginInstallationService.install(UpmPluginInstallationService.java:120)> at com.atlassian.upm.core.rest.resources.install.InstallTask.installFromFile(InstallTask.java:156)> at com.atlassian.upm.core.rest.resources.install.InstallFromFileTask.executeTask(InstallFromFileTask.java:37)> at com.atlassian.upm.core.rest.resources.install.InstallTask.run(InstallTask.java:81)> at com.atlassian.upm.core.async.AsynchronousTaskManager.executeTask(AsynchronousTaskManager.java:124)> at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:102)> at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:99)> at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)> at java.util.concurrent.FutureTask.run(FutureTask.java:266)> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)> at java.lang.Thread.run(Thread.java:748)> ... 52 frames trimmed>> Caused by: org.osgi.framework.BundleException: Unable to resolve com.demo.gitsource-cse-scripts [148](R 148.0): missing requirement [com.demo.cse-scripts [148](R 148.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.clientsideextensions) Unresolved requirements: [[com.demo.cse-scripts [148](R 148.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.clientsideextensions)]> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)> ... 52 common frames omitted> 2020-12-18 10:16:08,910 ERROR [UpmAsynchronousTaskManager:thread-1] ychannab *1RYH7I3x616x10439x10 m6fzw6 172.27.115.5,127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.plugin.manager.PluginEnabler Unable to enable plugin com.demo.cse-scripts> com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.demo.cse-scripts> at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)> at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:252)> at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)> at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:97)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$enableDependentPlugins$22(DefaultPluginManager.java:1243)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1227)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$addPlugins$20(DefaultPluginManager.java:1212)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1112)> at com.atlassian.stash.internal.plugin.StashPluginManager.addPlugins(StashPluginManager.java:79)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$scanForNewPlugins$12(DefaultPluginManager.java:917)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:872)> at com.atlassian.plugin.manager.DefaultPluginManager.lambda$installPlugins$11(DefaultPluginManager.java:832)> at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)> at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:818)> at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)> at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)> at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)> at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifacts(AbstractPluginInstallHandler.java:133)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifact(AbstractPluginInstallHandler.java:119)> at com.atlassian.upm.core.install.JarPluginInstallHandler.installPluginInternal(JarPluginInstallHandler.java:52)> at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installPlugin(AbstractPluginInstallHandler.java:60)> at com.atlassian.upm.core.install.DefaultPluginInstallationService.execute(DefaultPluginInstallationService.java:133)> at com.atlassian.upm.core.install.DefaultPluginInstallationService.install(DefaultPluginInstallationService.java:101)> at com.atlassian.upm.install.UpmPluginInstallationService.install(UpmPluginInstallationService.java:120)> at com.atlassian.upm.core.rest.resources.install.InstallTask.installFromFile(InstallTask.java:156)> at com.atlassian.upm.core.rest.resources.install.InstallFromFileTask.executeTask(InstallFromFileTask.java:37)> at com.atlassian.upm.core.rest.resources.install.InstallTask.run(InstallTask.java:81)> at com.atlassian.upm.core.async.AsynchronousTaskManager.executeTask(AsynchronousTaskManager.java:124)> at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:102)> at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:99)> at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)> at java.util.concurrent.FutureTask.run(FutureTask.java:266)> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)> at java.lang.Thread.run(Thread.java:748)> ... 52 frames trimmed> Caused by: org.osgi.framework.BundleException: Unable to resolve com.demo.cse-scripts [148](R 148.0): missing requirement [com.demo.cse-scripts [148](R 148.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.clientsideextensions) Unresolved requirements: [[com.demo.cse-scripts [148](R 148.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.clientsideextensions)]> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)> ... 52 common frames omitted



Even code from https://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template/src/master/ throwing below error when trying to run - atlas-run

 

[INFO] 2020-12-21 11:27:03,156 ERROR [spring-startup] c.a.p.o.f.OsgiPluginInstalledHelper Cannot determine required plugins, cannot resolve bundle 'com.atlassian.myapp.bitbucket-plugin-template'
[INFO] 2020-12-21 11:27:06,051 ERROR [spring-startup] c.a.plugin.osgi.factory.OsgiPlugin Detected an error (BundleException) enabling the plugin 'com.atlassian.myapp.bitbucket-plugin-template' : Unable to resolve com.atlassian.myapp.bitbucket-plugin-template [90](R 90.0): missing requirement [com.atlassian.myapp.bitbucket-plugin-template [90](R 90.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.plugin.clientsideextensions)(version>=1.2.3)) Unresolved requirements: [[com.atlassian.myapp.bitbucket-plugin-template [90](R 90.0)] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.plugin.clientsideextensions)(version>=1.2.3))]. This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
[INFO] 2020-12-21 11:27:06,051 WARN [spring-startup] c.a.plugin.impl.AbstractPlugin Unable to enable plugin 'com.atlassian.myapp.bitbucket-plugin-template'

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

Contest: Share your custom Bitbucket Pipe and win

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...

2,132 views 11 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you