Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0 (Beta)
    • Fix Version/s: 1.4.1
    • Component/s: Database
    • Labels:
      None
    • Environment:
      java version "1.6.0_17"
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
      PostgreSQL 8.1.18
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      Adding a not-null column in a single operation is not normally practical...

      2010-05-07 16:20:58,243 [main] INFO org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor - Starting task executor, thread name 'check-out-project'.
      2010-05-07 16:20:58,470 [main] ERROR JPOX.RDBMS - Error thrown executing ALTER TABLE "BUILDDEFINITION" ADD COLUMN "UPDATE_POLICY" int4 NOT NULL : ERROR: column "UPDATE_POLICY"
      contains null values
      org.postgresql.util.PSQLException: ERROR: column "UPDATE_POLICY" contains null values
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:332)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.execute(WrappedStatement.java:91)
      at org.jpox.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:614)
      at org.jpox.store.rdbms.table.AbstractTable.executeDdlStatementList(AbstractTable.java:570)
      at org.jpox.store.rdbms.table.TableImpl.validateColumns(TableImpl.java:256)
      at org.jpox.store.rdbms.RDBMSManager$ClassAdder.performTablesValidation(RDBMSManager.java:3076)
      at org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3326)
      at org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManager.java:2567)
      at org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RDBMSManager.java:2419)
      at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.java:824)
      at org.jpox.store.rdbms.RDBMSManager.addClass(RDBMSManager.java:838)
      at org.jpox.store.StoreManager.getDatastoreClass(StoreManager.java:1218)
      at org.jpox.store.rdbms.RDBMSManager.getExtent(RDBMSManager.java:1357)
      at org.jpox.AbstractPersistenceManager.getExtent(AbstractPersistenceManager.java:2328)
      at org.apache.continuum.dao.BuildDefinitionTemplateDaoImpl.getContinuumBuildDefinitionTemplateWithType(BuildDefinitionTemplateDaoImpl.java:143)
      at org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.getContinuumDefaultWithType(DefaultBuildDefinitionService.java:262)
      at org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.getDefaultAntBuildDefinitionTemplate(DefaultBuildDefinitionService.java:273)
      at org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.initializeDefaultContinuumBuildDefintions(DefaultBuildDefinitionService.java:132)
      at org.apache.maven.continuum.builddefinition.DefaultBuildDefinitionService.initialize(DefaultBuildDefinitionService.java:121)
      at org.codehaus.plexus.spring.PlexusLifecycleBeanPostProcessor.postProcessAfterInitialization(PlexusLifecycleBeanPostProcessor.java:217)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1553)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1402)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.codehaus.plexus.spring.PlexusComponentFactoryBean.resolveRequirement(PlexusComponentFactoryBean.java:246)
      at org.codehaus.plexus.spring.PlexusComponentFactoryBean.createInstance(PlexusComponentFactoryBean.java:163)
      at org.codehaus.plexus.spring.PlexusComponentFactoryBean.getObject(PlexusComponentFactoryBean.java:108)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1402)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.codehaus.plexus.spring.PlexusComponentFactoryBean.createInstance(PlexusComponentFactoryBean.java:141)
      at org.codehaus.plexus.spring.PlexusComponentFactoryBean.getObject(PlexusComponentFactoryBean.java:108)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1402)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:387)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:377)
      at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1110)
      at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:221)
      at org.apache.maven.continuum.notification.manager.spring.NotifierFactoryBean.getObject(NotifierFactoryBean.java:51)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:274)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
      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:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      at $Proxy38.start(Unknown Source)

        Issue Links

          Activity

          Hide
          Odd Vinje added a comment -

          I can confirm the same error. This stops us for upgrading to 1.4.0. It would be useful to add CI tests for other datbases than Derby (MySql, Postgres, etc) so that these kind of errors can be spotted before releasing Continuum. Many corporate users does use other databases than Derby.

          Show
          Odd Vinje added a comment - I can confirm the same error. This stops us for upgrading to 1.4.0. It would be useful to add CI tests for other datbases than Derby (MySql, Postgres, etc) so that these kind of errors can be spotted before releasing Continuum. Many corporate users does use other databases than Derby.
          Hide
          Wendy Smoak added a comment -

          What versions are you upgrading from and to?

          Show
          Wendy Smoak added a comment - What versions are you upgrading from and to?
          Hide
          Stephen Coy added a comment -

          I believe that it was 1.2.3 to 1.4.0 for us.

          Show
          Stephen Coy added a comment - I believe that it was 1.2.3 to 1.4.0 for us.
          Hide
          Odd Vinje added a comment -

          1.3.6 is running ok in our case, 1.4.0 is not, so the error must have been introduced between these to versions.

          Show
          Odd Vinje added a comment - 1.3.6 is running ok in our case, 1.4.0 is not, so the error must have been introduced between these to versions.
          Hide
          Brett Porter added a comment -

          it is working on MySQL with 1.4.1-SNAPSHOT

          Show
          Brett Porter added a comment - it is working on MySQL with 1.4.1-SNAPSHOT
          Hide
          Stephen Coy added a comment -

          Does that mean you think you fixed it, or that it happens to work with MySQL? If it did indeed work with MySQL, what was the SQL that it executed?

          Show
          Stephen Coy added a comment - Does that mean you think you fixed it, or that it happens to work with MySQL? If it did indeed work with MySQL, what was the SQL that it executed?
          Hide
          Brett Porter added a comment -

          I haven't changed anything, but I did check that the model file was correct (it sets a default value for null-value). It already worked on a MySQL installation. I didn't capture the SQL at the time.

          However, checking again I noticed something weird - the generated files seem checked in. I'm taking a closer look.

          If that's not the problem, maybe we're missing a <required>false</required>

          Show
          Brett Porter added a comment - I haven't changed anything, but I did check that the model file was correct (it sets a default value for null-value). It already worked on a MySQL installation. I didn't capture the SQL at the time. However, checking again I noticed something weird - the generated files seem checked in. I'm taking a closer look. If that's not the problem, maybe we're missing a <required>false</required>
          Hide
          Brett Porter added a comment -

          This affected the default database as well. Fixed, and tested I could upgrade all the way from a 1.2.2 database.

          Show
          Brett Porter added a comment - This affected the default database as well. Fixed, and tested I could upgrade all the way from a 1.2.2 database.

            People

            • Assignee:
              Brett Porter
              Reporter:
              Stephen Coy
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: