Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

plugin with java 8 compiled dependencies cannot be installed

Frédéric Esnault
Contributor
May 23, 2019

Hi community

I'm developping a new version of one of my plugin, using an upgraded dependency.

The previous version compiles and installs fine in Jira, but this version fails with this trace :

2019-05-23 18:01:11,520 UpmAsynchronousTaskManager:thread-1 ERROR admin 1076x1572x3 143kc40 0:0:0:0:0:0:0:1 /rest/plugins/1.0/installed-marketplace [c.a.plugin.loaders.ScanningPluginLoader] Unable to deploy plugin 'com.atl.jira.tooling.connector' from 'Unit: /Users/phoenix/atl/sources/toolplugin/target/jira/home/plugins/installed-plugins/plugin_7470315700700856865_connector-6.7.0-SNAPSHOT.jar (1558627269000)'.
2019-05-23 18:01:11,520 UpmAsynchronousTaskManager:thread-1 ERROR admin 1076x1572x3 143kc40 0:0:0:0:0:0:0:1 /rest/plugins/1.0/installed-marketplace [c.a.plugin.loaders.ScanningPluginLoader] Because of the following exception:
com.atlassian.plugin.PluginParseException: Unable to scan for host components in plugin classes
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:67)
at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
at com.atlassian.jira.plugin.MasterPluginFactory.create(MasterPluginFactory.java:73)
...
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy126.installPlugins(Unknown Source)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
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 com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:139)
at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:134)
....
Caused by: java.io.IOException: Error parsing class file
at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:58)
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.findUsedHostComponents(HostComponentSpringStage.java:193)
at com.atlassian.plugin.osgi.factory.transform.stage.HostComponentSpringStage.execute(HostComponentSpringStage.java:65)
... 90 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 19
at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:497)
at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:486)
at com.atlassian.plugin.osgi.util.ClassBinaryScanner.scanClassBinary(ClassBinaryScanner.java:37)
... 92 more
2019-05-23 18:01:11,526 UpmAsynchronousTaskManager:thread-1 WARN admin 1076x1572x3 143kc40 0:0:0:0:0:0:0:1 /rest/plugins/1.0/installed-marketplace [c.a.u.core.install.DefaultPluginInstallationService] Plugin installation failed: Unknown error, plugin not installed
2019-05-23 18:01:11,526 UpmAsynchronousTaskManager:thread-1 WARN admin 1076x1572x3 143kc40 0:0:0:0:0:0:0:1 /rest/plugins/1.0/installed-marketplace [c.a.u.core.install.DefaultPluginInstallationService] com.atlassian.upm.spi.PluginInstallException: Unknown error, plugin not installed
com.atlassian.upm.spi.PluginInstallException: Unknown error, plugin not installed
at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifact(AbstractPluginInstallHandler.java:122)
at com.atlassian.upm.core.install.JarPluginInstallHandler.installPluginInternal(JarPluginInstallHandler.java:52)
....

 This error seems to be linked to plugins compiled with Java 8 (maven source/target version set to 1.8). If I build previous version for java 1.8, it fails when i try ton install it. If i set target version to 1.7, it works.

But for the new version, even lowering version to 1.7 does not work. I think it's the upgraded dependency that I import with my plugin that must have been compiled for java 8 (or just really using java 8 features, like lambdas).

So my question is, how can I get my plugin to work ? 

Is that related to the bnd tool included in jira that would be too old ? 

I can't believe there is no way to fix this, java 8 is quite old now.

Hoping that some of you have a solution for this, I would really appreciate !

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events