Bamboo plugins fail to start with java.lang.IllegalAccessError
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
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
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.
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.
1
2
3
4
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)
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
1
-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.
Solution
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:
Dynatrace 6.2.1 Release Notes: JLT-125318 Java Agent: Java 8: Fixed IllegalAccessError when using a private static method as a reference
If this doesn't help you'll need to disable the Dynatrace Java agent and restart Bamboo.
Was this helpful?