com.cenqua.crucible.hibernate.CruDBException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Atlassian JIRA | Partha Kamal [Atlassian] | 8 years ago
  1. 0

    It appears that Crucible cannot upgrade directly from 1.6.1 to 2.0, because of the problem database http://forums.atlassian.com/ann.jspa?annID=41 Error from the log: {noformat} ERROR - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbControlFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor threw exception; nested exception is com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/local/crucible-2.0.0/sql/HSQL/upgrade/upgrade_30.sql: SQL script error on line 268: "alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review;" (Integrity constraint violation - no parent 19, table: CRU_COMMENT in statement [alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review]), please contact http://www.atlassian.com/support/ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) {noformat} A workaround is to upgrade to version 1.6.6, then upgrade to version 2.0. To do so; # Shutdown your Crucible server completely. # Make a backup of your {{FISHEYE_INST}} directory # Download crucible 1.6.6 from [www.atlassian.com] # Follow the instructions in the [Upgrade Guide|http://confluence.atlassian.com/x/Z4HdBQ] to upgrade to this new version. # Next, repeat to upgrade to 2.0

    Atlassian JIRA | 7 years ago | Ming Giet Chong [Atlassian]
    com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/local/crucible-2.0.0/sql/HSQL/upgrade/upgrade_30.sql: SQL script error on line 268: "alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review;" (Integrity constraint violation - no parent 19, table: CRU_COMMENT in statement [alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review]), please contact http://www.atlassian.com/support/
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    It appears that Crucible cannot upgrade directly from 1.6.1 to 2.0, because of the problem database http://forums.atlassian.com/ann.jspa?annID=41 Error from the log: {noformat} ERROR - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbControlFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor threw exception; nested exception is com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/local/crucible-2.0.0/sql/HSQL/upgrade/upgrade_30.sql: SQL script error on line 268: "alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review;" (Integrity constraint violation - no parent 19, table: CRU_COMMENT in statement [alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review]), please contact http://www.atlassian.com/support/ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) {noformat} A workaround is to upgrade to version 1.6.6, then upgrade to version 2.0. To do so; # Shutdown your Crucible server completely. # Make a backup of your {{FISHEYE_INST}} directory # Download crucible 1.6.6 from [www.atlassian.com] # Follow the instructions in the [Upgrade Guide|http://confluence.atlassian.com/x/Z4HdBQ] to upgrade to this new version. # Next, repeat to upgrade to 2.0

    Atlassian JIRA | 7 years ago | Ming Giet Chong [Atlassian]
    com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/local/crucible-2.0.0/sql/HSQL/upgrade/upgrade_30.sql: SQL script error on line 268: "alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review;" (Integrity constraint violation - no parent 19, table: CRU_COMMENT in statement [alter table cru_comment add constraint FKE5A1D10644A616B5 foreign key (cru_review_id) references cru_review]), please contact http://www.atlassian.com/support/

    Root Cause Analysis

    1. com.cenqua.crucible.hibernate.CruDBException

      java.io.IOException: The process cannot access the file because another process has locked a portion of the file

      at com.cenqua.crucible.hibernate.Config.configDB()
    2. com.cenqua.crucible
      HibernateUtil.setUp
      1. com.cenqua.crucible.hibernate.Config.configDB(Config.java:64)
      2. com.cenqua.crucible.hibernate.HibernateUtil.setUp(HibernateUtil.java:86)
      3. com.cenqua.crucible.hibernate.HibernateUtil.setUp(HibernateUtil.java:56)
      3 frames