It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

677 views 2 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you