Atlas-run fails to start Bamboo

Hi there! I’m trying to get started with development of a custom task for Bamboo. Not having worked with Atlassian’s SDK, I have run through the setup instructions and (JIRA-based) tutorials from the “Getting Started” document at https://developer.atlassian.com/server/framework/atlassian-sdk/ - I am now able to create a JIRA plugin that modifies a menu, and see that in action using atlas-run and use the QuickReload feature. So far, so good.

Next, I am trying to follow the Bamboo Task tutorial at https://developer.atlassian.com/server/bamboo/introduction-to-writing-tasks/

Here is where things are not working as expected. I have created the plugin, but it appears that atlas-run fails to start Bamboo. The relevant exception seems to be this (I’d love to upload the full console output, but as a new user of this site, I’m not allowed):

[INFO] [talledLocalContainer] 2024-06-04 17:09:11,419 WARN [C3P0PooledConnectionPoolManager[identityToken->z8kfsxb31r7efvr1453krl|75c3af1e]-HelperThread-#2] [ThreadPoolAsynchronousRunner] An Error forced the closing of Thread[C3P0PooledConnectionPoolManager[identityToken->z8kfsxb31r7efvr1453krl|75c3af1e]-HelperThread-#2,5,main]. Will attempt to reconstruct, but this might mean that something bad is happening.
[INFO] [talledLocalContainer] java.lang.ExceptionInInitializerError
[INFO] [talledLocalContainer] 	at com.ibm.icu.text.Collator.<clinit>(Collator.java:946)
[INFO] [talledLocalContainer] 	at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer] 	at java.lang.Class.forName(Class.java:264)
[INFO] [talledLocalContainer] 	at org.h2.value.CompareMode.<clinit>(CompareMode.java:57)
[INFO] [talledLocalContainer] Exception in thread "C3P0PooledConnectionPoolManager[identityToken->z8kfsxb31r7efvr1453krl|75c3af1e]-HelperThread-#2" java.lang.ExceptionInInitializerError
[INFO] [talledLocalContainer] 	at com.ibm.icu.text.Collator.<clinit>(Collator.java:946)
[INFO] [talledLocalContainer] 	at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer] 	at org.h2.engine.SessionRemote.<init>(SessionRemote.java:95)
[INFO] [talledLocalContainer] 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116)
[INFO] [talledLocalContainer] 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100)
[INFO] [talledLocalContainer] 	at org.h2.Driver.connect(Driver.java:69)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
[INFO] [talledLocalContainer] 	at java.lang.Class.forName(Class.java:264)
[INFO] [talledLocalContainer] 	at org.h2.value.CompareMode.<clinit>(CompareMode.java:57)
[INFO] [talledLocalContainer] 	at org.h2.engine.SessionRemote.<init>(SessionRemote.java:95)
[INFO] [talledLocalContainer] 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116)
[INFO] [talledLocalContainer] 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100)
[INFO] [talledLocalContainer] 	at org.h2.Driver.connect(Driver.java:69)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
[INFO] [talledLocalContainer] 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
[INFO] [talledLocalContainer] Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
[INFO] [talledLocalContainer] 	at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:191)
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
[INFO] [talledLocalContainer] 	at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
[INFO] [talledLocalContainer] 	at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69)
[INFO] [talledLocalContainer] 	... 17 more
[INFO] [talledLocalContainer] 	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
[INFO] [talledLocalContainer] 	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
[INFO] [talledLocalContainer] 	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
[INFO] [talledLocalContainer] Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
[INFO] [talledLocalContainer] 	at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:191)
[INFO] [talledLocalContainer] 	at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
[INFO] [talledLocalContainer] 	at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69)
[INFO] [talledLocalContainer] 	... 17 more

For reference, this describes the environment in which I’m trying to execute this:

guus@octarine:~/SourceCode/XmppInteropTesting/myfirstplugin$ atlas-version

ATLAS Version:    8.2.8
ATLAS Home:       /usr/share/atlassian-plugin-sdk-8.2.8
ATLAS Scripts:    /usr/share/atlassian-plugin-sdk-8.2.8/bin
ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4
AMPS Version:     8.1.2
--------
Executing: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/conf/settings.xml
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
Maven home: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4
Java version: 1.8.0_402, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.5.0-35-generic", arch: "amd64", family: "unix"
guus@octarine:~/SourceCode/XmppInteropTesting/myfirstplugin$ javac -version
javac 1.8.0_402

Is this a known issue? Is there a way around this? Is there a different way to get started with Bamboo development?

1 Like

I believe the issue is caused by a library not agreeing with being run by a Java version 1.8 that has a patch version higher than 255 (eg: 1.8.0_402).

A workaround for this issue is to use a newer version of Java (in direct contradiction to the existing documentation, that states that 1.8 must be used).

I’ve more or less randomly increased version numbers in the properties of the pom.xml file of my project, until I got somewhere that appears to work. What works for me so far is this:

<properties>
    <bamboo.version>9.3.3</bamboo.version>
    <bamboo.data.version>${bamboo.version}</bamboo.data.version>
    <amps.version>8.10.1</amps.version>
    <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
    <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
    <platform.version>6.1.6</platform.version>
    <jackson.version>2.15.2</jackson.version>
    <spotless.version>2.39.0</spotless.version>
    <junit-jupiter.version>5.10.0</junit-jupiter.version>
    <mockito.version>5.5.0</mockito.version>
    <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
    <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
</properties>

There is no particular rhyme or reason to this. I just started changing stuff until it worked.

It would be desirable for Atlassian to update the documentation and/or the project template that is used by atlas-create-bamboo-plugin.