Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-19736

Renaming artifact in YAML break deployment

XMLWordPrintable

      Summary

      After renaming the artifact in YAML, deployment environment couldn't deploy anymore and couldn't change the build plan

      Steps to Reproduce

      1. Use the following YAML for a build plan:
        ---
        project:
          key: SPECS
          plan:
            key: STASH
            name: bamboo specs yaml
        stages:
          - jobs:
              - scripts:
                  - echo 'testing artifact'
                artifacts:
                  - name: test files
                    path: test.txt
        ...
        
      2. Run the build plan to create the artifact
      3. Create a deployment project to use download this artifact
      4. Create/deploy a release from this deployment project
      5. Edit the YAML file to change the name "test files" to be "test file" (without "s")
      6. Run the build to create artifact
      7. Create/deploy a release from the related deployment project
      8. Change the build plan in the deployment project

      Expected Results

      1. The release successfully created/deployed
      2. Able to change the build plan

      Actual Results

      1. When creating/deploying the release, the below exception is thrown in the atlassian-bamboo.log file:
        2018-03-06 16:08:24,137 ERROR [http-nio-8085-exec-14] [ExceptionMappingInterceptor] Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        org.springframework.orm.hibernate5.HibernateSystemException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        	at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:296)
        	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:362)
        	at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:313)
        	at com.atlassian.bamboo.deployments.projects.persistence.DeploymentProjectDaoImpl.getProjectItems(DeploymentProjectDaoImpl.java:206)
        	at sun.reflect.GeneratedMethodAccessor1632.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:497)
        	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        	at com.sun.proxy.$Proxy89.getProjectItems(Unknown Source)
        	at com.atlassian.bamboo.deployments.versions.service.DeploymentVersionServiceImpl$3.run(DeploymentVersionServiceImpl.java:454)
        ...
        Caused by: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:79)
        	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:105)
        	at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:733)
        	at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:4740)
        	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1624)
        	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1608)
        	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1658)
        	at org.hibernate.loader.Loader.getRow(Loader.java:1556)
        	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:740)
        	at org.hibernate.loader.Loader.processResultSet(Loader.java:985)
        	at org.hibernate.loader.Loader.doQuery(Loader.java:943)
        	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
        	at org.hibernate.loader.Loader.doList(Loader.java:2615)
        	at org.hibernate.loader.Loader.doList(Loader.java:2598)
        	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)
        	at org.hibernate.loader.Loader.list(Loader.java:2425)
        	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
        	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1896)
        	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:366)
        	at com.atlassian.bamboo.deployments.projects.persistence.DeploymentProjectDaoImpl.lambda$getProjectItems$10(DeploymentProjectDaoImpl.java:210)
        	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:359)
        
        
      2. When changing the build plan in the deployment project, the below exception is thrown in the atlassian-bamboo.log file:
        2018-03-06 16:09:28,037 ERROR [http-nio-8085-exec-13] [ExceptionMappingInterceptor] Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        org.springframework.orm.hibernate5.HibernateSystemException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        	at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:296)
        	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:362)
        	at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:313)
        	at com.atlassian.bamboo.deployments.projects.persistence.DeploymentProjectDaoImpl.getProjectItems(DeploymentProjectDaoImpl.java:206)
        	at sun.reflect.GeneratedMethodAccessor1632.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:497)
        	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        	at com.sun.proxy.$Proxy89.getProjectItems(Unknown Source)
        	at com.atlassian.bamboo.deployments.projects.service.DeploymentProjectServiceImpl.validateArtifactTaskDefinitionOnPlanChange(DeploymentProjectServiceImpl.java:407)
        ...
        Caused by: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : com.atlassian.bamboo.deployments.projects.persistence.items.AbstractMutableDeploymentProjectItem
        	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:79)
        	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:105)
        	at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:733)
        	at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:4740)
        	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1624)
        	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1608)
        	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1658)
        	at org.hibernate.loader.Loader.getRow(Loader.java:1556)
        	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:740)
        	at org.hibernate.loader.Loader.processResultSet(Loader.java:985)
        	at org.hibernate.loader.Loader.doQuery(Loader.java:943)
        	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
        	at org.hibernate.loader.Loader.doList(Loader.java:2615)
        	at org.hibernate.loader.Loader.doList(Loader.java:2598)
        	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)
        	at org.hibernate.loader.Loader.list(Loader.java:2425)
        	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
        	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1896)
        	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:366)
        	at com.atlassian.bamboo.deployments.projects.persistence.DeploymentProjectDaoImpl.lambda$getProjectItems$10(DeploymentProjectDaoImpl.java:210)
        	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:359)
        

      Notes

      In Deployment Project Summary, the Available artifact is showing "No shared artifacts found for related plan" even though the shared artifact exist.

      Workaround

      1. Delete the YAML build plan
      2. Change the related Deployment Project to use different build plan (so that Bamboo will be able to fully delete the above build plan)
      3. Re-create the YAML build plan
      4. Change the related Deployment Project to use the YAML build plan again

              pbruski Przemek Bruski
              klfoong Foong (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: