Bamboo Specs 6.1 throwing 'object references an unsaved transient instance' when creating new plan Edited

Since upgrading to Bamboo 6.1, we are no longer able to create new plans in existing projects through Bamboo-Specs API. This feature worked on Bamboo 6.0. 

To reproduce, all we have to do is attempt to create a brand new build plan in an existing project. When executed, we get the following:   



2017-07-28 11:49:36,631 INFO [BambooServer] Publishing plan ENOT-BLDRC
2017-07-28 11:49:37,648 INFO [BambooServer] An error occurred while publishing plan ENOT-BLDRC: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan
Exception in thread "main" com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing plan ENOT-BLDRC: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan
2017-07-28 11:49:37,650 DEBUG [BambooServer] {"message":"object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan","status-code":500}
at com.atlassian.bamboo.specs.util.BambooServer.translateRestException(BambooServer.java:166)
at com.atlassian.bamboo.specs.util.BambooServer.translateException(BambooServer.java:136)
at com.atlassian.bamboo.specs.util.BambooServer.publish(BambooServer.java:93)
at com.mediant.bamboo.project.MediantProjectConfiguration.publish(MediantProjectConfiguration.java:23)
at com.mediant.bamboo.PlanSpec.main(PlanSpec.java:96)
Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan
at com.atlassian.bamboo.specs.util.RestHelper.lambda$sendRequest$2(RestHelper.java:89)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at com.atlassian.bamboo.specs.util.RestHelper.sendRequest(RestHelper.java:92)
at com.atlassian.bamboo.specs.util.RestHelper.post(RestHelper.java:201)
at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:23)

 

EDIT : Here is the log from the bamboo server that we are attempting to publish to

 

2017-07-28 12:52:09,097 WARN [ajp-nio-8009-exec-1] [BambooRuntimeExceptionMapper] Unexpected error from REST call

org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance beforeQuery flushing: com.atlassian.bamboo.plan.AbstractPlan

        at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:268)

        at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:362)

        at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:313)

        at com.atlassian.bamboo.repository.PlanRepositoryLinkHibernateDao.getPlanRepositoryLinks(PlanRepositoryLinkHibernateDao.java:32)

        at com.atlassian.bamboo.repository.RepositoryDefinitionManagerImpl.getPlanRepositoryDefinitions(RepositoryDefinitionManagerImpl.java:82)

 

However, if I go into bamboo and manually create the build plan and then re-run the bamboo-specs script, it completes successfully.

1 answer

0 votes

Seems like a potential bug, but I'm struggling to reproduce locally.   Would you mind sharing your Bamboo Specs project with us so we can reproduce?  Alternatively consider contacting our Support https://support.atlassian.com/contact/#/ to avoid sharing your Bamboo Specs code publically. 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,086 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot