Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center Apps Program coming soon

G’day Bamboo customers, As we approach GA for Bamboo Data Center , we would like to inform you that the Data Center Apps Program for Bamboo starts this quarter. How long does it take? We are g...

47 views 0 4
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