Client-Side Extension: Cannot enable Bitbucket Plugin

Hi,

I’m unable to enable Bitbucket Plugin on my localhost dev. machine.

I follow this guide of Client-Side Extension: Getting Started - Client-side Extensions

When I go to manage apps → Bitbucket Plugin → Enable, in logs I receive following error:

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 [93](R 93.0): missing requirement [com.atlassian.myapp.bitbucket-plugin-template [93](R 93.0)] osgi.ee; (&(osgi.ee=JavaSE)(version=9.0))

com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.atlassian.myapp.bitbucket-plugin-template
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)

Hi @TamirK,

Looking at that error it looks like there is a Java version (the plugin is expecting Java 9 or there is a dependency that is) and/or dependency discrepancy with your plugin.

Please verify the right version of Java is being used to compile/build your plugin and there is no issue with any dependency that your plugin is using with regard to the Java version.

Kind regards,
Christopher Kochovski
Bitbucket Data Center Developer

Hi @ChristopherKochovski pherKochovski,

Thank you for your response.
In the documnetation, it is written that I need to use Java JDK 1.8
I have it on my pc. This is the java version I use:

C:\Users\1000259845>java -version
java version “1.8.0_341”
Java™ SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot™ Client VM (build 25.341-b10, mixed mode)

C:\Work\bitbucket-client-side-extensions-template>echo %java_home%
C:\Program Files (x86)\Java\jdk1.8.0_341

Can you suggest?

Thanks! Tamir

Hi,

I installed the latest java JDK 1.9 and same issue occurs. Please suggest.

C:\Users>java -version
java version “9.0.4”
Java™ SE Runtime Environment (build 9.0.4+11)
Java HotSpot™ 64-Bit Server VM (build 9.0.4+11, mixed mode)

C:\Users>echo %java_home%
C:\Program Files\Java\jdk-9.0.4

Thanks! Tamir

The Java 8 version looks fine. Please do not use Java 9 as it is unsupported; see the Bitbucket supported platforms page for more details here

Are you aware of any dependency that your plugin is using that is/was built with Java 9? Or is there a specific version that you are importing that requires Java 9 potentially? Other community members had the same issue regarding dependencies, see here.

Kind regards,
Christopher Kochovski
Bitbucket Developer

Hi @ChristopherKochovski,

I’m using java 1.8 and run the template provided by Atlassian: git@bitbucket.org:atlassianlabs/bitbucket-client-side-extensions-template.git
link: https://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template/src/master/
I don’t make any changes. Just want that this template will work.

Also, I read the link which you provided. Which files should I update?

Thanks! Tamir