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

Upgrading to 2.2.1 with expired license causes exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.2.3
    • 2.2.1
    • Elastic Bamboo, Upgrading
    • None

    Description

      When you upgrade Bamboo when you license is expired, no upgrade tasks are run, instead you get an error which prevents you from proceeding until you update your licences.

      When updating your license, there is a hook which will check details of elastic bamboo and update them based on the license.
      However, because none of the upgrade tasks have been run yet there is not database tables available to get this information from and
      hence you get the stack trace below.

      These exceptions do not actually prevent you from updating the license (it just looks like it does), so a restart will resolve the state of your bamboo instance.

      org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is java.sql.SQLException: Table not found in statement [select elasticima0_.ELASTIC_IMAGE_ID as ELASTIC_1_, elasticima0_.AMI_IMAGE_ID as AMI_IMAG2_, elasticima0_.CAPABILITY_SET as CAPABILI3_ from ELASTIC_IMAGE elasticima0_]
      Caused by: java.sql.SQLException: Table not found in statement [select elasticima0_.ELASTIC_IMAGE_ID as ELASTIC_1_, elasticima0_.AMI_IMAGE_ID as AMI_IMAG2_, elasticima0_.CAPABILITY_SET as CAPABILI3_ from ELASTIC_IMAGE elasticima0_]
      	at org.hsqldb.jdbc.Util.throwError(Unknown Source)
      	at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
      	at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
      	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
      	at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:263)
      	at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:236)
      	at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:67)
      	at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:784)
      	at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269)
      	at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
      	at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
      	at net.sf.hibernate.loader.Loader.list(Loader.java:1048)
      	at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
      	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
      	at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
      	at com.atlassian.hibernate.HibernateObjectDao$2.doInHibernate(HibernateObjectDao.java:97)
      	at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
      	at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341)
      	at com.atlassian.hibernate.HibernateObjectDao.findAllSorted(HibernateObjectDao.java:90)
      	at com.atlassian.hibernate.HibernateObjectDao.findAll(HibernateObjectDao.java:78)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:585)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy18.findAll(Unknown Source)
      	at com.atlassian.bamboo.agent.elastic.server.LocalAwsManagerImpl.getAllElasticImages(LocalAwsManagerImpl.java:148)
      	at com.atlassian.bamboo.agent.elastic.server.LocalAwsManagerImpl.setupDefaultElasticImage(LocalAwsManagerImpl.java:91)
      	at com.atlassian.bamboo.agent.elastic.server.LocalAwsManagerImpl.getElasticImageByAmiId(LocalAwsManagerImpl.java:51)
      	at com.atlassian.bamboo.agent.elastic.server.LocalAwsManagerImpl.getDefaultElasticImage(LocalAwsManagerImpl.java:67)
      	at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.isElasticSupportPossible(ElasticFunctionalityFacadeImpl.java:163)
      	at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.recheckElasticSupportEnabledFlag(ElasticFunctionalityFacadeImpl.java:52)
      	at com.atlassian.bamboo.ww2.actions.admin.UpdateLicenseAction.execute(UpdateLicenseAction.java:116)
      

      Attachments

        Activity

          People

            bmccoy bmccoy
            bmccoy bmccoy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: