Bamboo export fails with error messages related to EC2

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 export fails and displays the following type of error messages:

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 26 27 28 29 30 31 32 33 34 2015-11-04 15:41:08,667 ERROR [http-apr-8085-exec-25] [Export] org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType Caused by: net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:70) at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:92) at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:67) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590) at net.sf.hibernate.loader.Loader.getRow(Loader.java:505) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1048) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at com.atlassian.hibernate.HibernateObjectDao$2.doInHibernate(HibernateObjectDao.java:97) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findAllSorted(HibernateObjectDao.java:90) at com.atlassian.hibernate.HibernateObjectDao.findAll(HibernateObjectDao.java:78) ... Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor3225.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:62) ... 299 more Caused by: java.lang.IllegalArgumentException: No enum const class com.atlassian.aws.ec2.EC2InstanceType.M3Large at java.lang.Enum.valueOf(Enum.java:196) at com.atlassian.aws.ec2.EC2InstanceType.valueOf(EC2InstanceType.java:9) ... 303 more
(Auto-migrated image: description temporarily unavailable)

In the above example, the error is reporting that there's no M3Large EC2 instance type available. This is happening because the user has one (or more) elastic image(s) configured to use the M3Large instance type, however, this instance type is not available anymore to the Bamboo version you are running with and/or EC2 region you're using.

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 26 27 28 29 30 31 32 33 34 35 36 37 2015-11-19 10:50:31,109 ERROR [http-apr-8085-exec-15] [Export] org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region Caused by: net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:70) at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:92) at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:67) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590) at net.sf.hibernate.loader.Loader.getRow(Loader.java:505) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1048) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at com.atlassian.hibernate.HibernateObjectDao$2.doInHibernate(HibernateObjectDao.java:97) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findAllSorted(HibernateObjectDao.java:90) at com.atlassian.hibernate.HibernateObjectDao.findAll(HibernateObjectDao.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ... Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor489.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:62) ... 300 more Caused by: java.lang.IllegalArgumentException: No enum const class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region.EU_CENTRAL_1 at java.lang.Enum.valueOf(Enum.java:196) at com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region.valueOf(AwsSupportConstants.java:130) ... 304 more
(Auto-migrated image: description temporarily unavailable)

This error, for example, is reporting that there's no image available in the EU_CENTRAL_1 (Frankfurt) region. This is happening because the user has one (or more) elastic image(s) configured inside this region, however, this region has no images available anymore to the Bamboo version you are running with, so you can't have an elastic image associated to this region.

Diagnosis

This can happen to Bamboo instances that have or had the Elastic Bamboo configuration enabled. Disabling the Elastic Bamboo option will NOT fix the problem. Users that have never activated this option should not run into this issue.

(Auto-migrated image: description temporarily unavailable)

Cause

Every time you run the export process, Bamboo will try to connect to AWS to make sure the elastic images' configurations are correct. It is possible that back when you started using your current Bamboo version, those elastic images were available in that region and/or had those instance types available, but they're not available anymore in EC2.

Solution

Resolution

#1 If you are using the Elastic Bamboo configuration and don't want to mess around with your data.

Please open a support request at support.atlassian.com under the Bamboo project and:

  1. Attach a Bamboo support zip (Bamboo Administration >> System >> Atlassian Support Tools >> Support Zip) to the support request.

  2. Create an SQL dump from the Bamboo database and attach it to the support request.

#2 If you are NOT using the Elastic Bamboo configuration.

This is to ensure that you can create an export from your Bamboo instance. If you decide to use Elastic Bamboo later on, you just have to enable the Elastic Bamboo configuration again, it will then automatically download the elastic images available to the bamboo version you're running on. Please perform the steps below:

  1. Go to Bamboo administration >> Elastic instances >> Elastic Bamboo >> Configuration.

  2. Click the Disable button at the bottom of the page.

  3. Stop Bamboo.

  4. Access the Bamboo database.

  5. Run the following SQL query:

    (!) Always backup your database before applying any changes.

    1 delete from elastic_image;
  6. Start Bamboo.

  7. Try to perform a new export.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.