Bamboo plugins fail to start with java.lang.IllegalAccessError

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Bamboo plugins fail to initialise on start-up with a java.lang.IllegalAccessError error.

Diagnosis

A stack trace similar to the following is found in the atlassian-bamboo.log:

2017-05-31 18:01:56,131 ERROR [localhost-startStop-1] [ScanningPluginLoader] Unable to deploy plugin 'com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-bitbucket' from 'Unit: /opt/atlassian/bamboo/atlassian-bamboo-6.0.1/atlassian-bamboo/WEB-INF/atlassian-bundled-plugins/atlassian-bamboo-plugin-bitbucket-6.0.1.jar (1495449986000)'.
2017-05-31 18:01:56,134 ERROR [localhost-startStop-1] [ScanningPluginLoader] Because of the following exception:
java.lang.IllegalAccessError: tried to access method com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.getElementAsString(Lorg/dom4j/Element;)Ljava/lang/String; from class com.atlassian.bamboo.vcs.viewer.module.VcsRepositoryViewerModuleDescriptorImpl$$dtt
	at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
	at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:962)
	at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:987)
	at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1390)
	at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1746)
	at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477)
	at com.atlassian.bamboo.vcs.viewer.module.VcsRepositoryViewerModuleDescriptorImpl$$dtt.dt_73_init_87(Unknown Source)
	at com.atlassian.bamboo.vcs.viewer.module.VcsRepositoryViewerModuleDescriptorImpl.init(VcsRepositoryViewerModuleDescriptorImpl.java:75)
	at com.atlassian.plugin.parsers.XmlDescriptorParser.createModuleDescriptor(XmlDescriptorParser.java:181)
	at com.atlassian.plugin.osgi.factory.OsgiPluginXmlDescriptorParser.createModuleDescriptor(OsgiPluginXmlDescriptorParser.java:57)
	at com.atlassian.plugin.parsers.XmlDescriptorParser.configurePlugin(XmlDescriptorParser.java:141)
	at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:240)
	at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
	at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
	at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
	at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
	at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
	at com.atlassian.bamboo.container.BambooContainer.init(BambooContainer.java:210)
	at com.atlassian.bamboo.container.BambooContainer.initialise(BambooContainer.java:197)
	at com.atlassian.bamboo.upgrade.UpgradeLauncher.initialiseBambooContainer(UpgradeLauncher.java:157)
	at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:91)
	at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:42)

You may also receive errors when attempting to edit a repository like the below, since the plugin was unable to be loaded.

tip/resting Created with Sketch.

The below stack trace doesn't necessarily mean you are affected by the issue with Dynatrace. It's a generic symptom of the repository plugin not being loaded, of which there could be other causes.

2017-05-31 21:52:15,903 ERROR [http-nio-8085-exec-46] [ExceptionMappingInterceptor] null
java.lang.NullPointerException
	at com.atlassian.bamboo.configuration.repository.VcsUIConfigBean.prepareEditHtmlFragments(VcsUIConfigBean.java:135)
	at com.atlassian.bamboo.configuration.repository.EditLinkedRepository.lambda$prepareHtml$0(EditLinkedRepository.java:74)
tip/resting Created with Sketch.

This may also affect other plugins, not just com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-bitbucket


Environment

  • Dynatrace Java Agent is installed and monitoring the Bamboo process via the agent path JVM argument:

    Example
    -agentpath:/opt/dynatrace/dynatrace-6.2/agent/lib64/libdtagent.so=name=Bamboo

Cause

This specific occurrence was observed when having Dynatrace 6.2 Java Agent monitoring the Bamboo process. Unconfirmed exactly what causes the incompatibility but Dynatrace bugs in the past have caused similar issues in other Atlassian Products. 

Workaround

If Dynatrace is required, please try updating it to the latest version first in an attempt to resolve the issue. According to the Dynatrace release notes, there was a fix for at least some instances of IllegalAccessErrors monitoring Java 8 processes in 6.2.1:

If this doesn't help you'll need to disable the Dynatrace Java agent and restart Bamboo.


Last modified on Nov 16, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.