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

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

0 answers

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,719 views 10 16
Read article

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