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

This widget could not be displayed.

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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

82 views 1 0
Join discussion

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