Question

When I run each test individually then it passes. However, when I run all my test they fails. Below is a stacktrace for one such instance.

There are other test will fails too but have similar exception. I've tried all that was suggested here like using MVCC=true and DB_CLOSE_DELAY=-1, but still NO GO.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': FactoryBean threw exception on object creation; nested exception is com.copyright.rup.common.test.integ.db.embedded.exceptions.EmbeddedDatabaseOperationException: Exception at liquibase update operation (classResourceAccessor is used) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323) ... 77 more Caused by: com.copyright.rup.common.test.integ.db.embedded.exceptions.EmbeddedDatabaseOperationException: Exception at liquibase update operation (classResourceAccessor is used) at com.copyright.rup.common.test.integ.db.embedded.AbstractEmbeddedDatabaseFactory.liquibaseUpdate(AbstractEmbeddedDatabaseFactory.java:391) at com.copyright.rup.common.test.integ.db.embedded.AbstractEmbeddedDatabaseFactory.liquibaseUpdate(AbstractEmbeddedDatabaseFactory.java:340) at com.copyright.rup.common.test.integ.db.embedded.AbstractEmbeddedDatabaseFactory.getDataSource(AbstractEmbeddedDatabaseFactory.java:274) at com.copyright.rup.common.test.integ.db.embedded.AbstractEmbeddedDatabaseFactory.getObject(AbstractEmbeddedDatabaseFactory.java:100) at com.copyright.rup.common.test.integ.db.embedded.AbstractEmbeddedDatabaseFactory.getObject(AbstractEmbeddedDatabaseFactory.java:46) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 82 more Caused by: liquibase.exception.ValidationFailedException: Validation Failed: 77 change sets check sum work_type_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:c0c8b703ac39eb37665a5dd644ce7a12 work_threshold_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:bd533b8b09be4268b1fe97504bd6fa4e doc_path_filter_init.groovy::2012-05-08::Stanislau Halauniou is now: 3:c85d1a0012f4cf7e5d8a4c686ce82659 doc_path_filter_limiter_init.groovy::2012-07-10::Alena Lakhava is now: 3:5f7a9461182ee6ab3add8106e47405e5 article_work_field_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:9841a4f8c52f68ab926fca5f168ad741 chapter_work_field_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:fb3d017b5a3fe6789ab7fbc24e4e48c6 monograph_work_field_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:40a323a8ac4631c1d18c83c214ebd4ac serial_work_field_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:ac9884af8e320db12adf4dec775df4e3 unknown_work_field_init.groovy::2012-08-23::Alena Lakhava is now: 3:48fd4b4eda29cf2a9efaac0ae37e92b7 article_work_cluster_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:81de239c26df91a5d97d97369eb4d8bf chapter_work_cluster_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:ada1c0f7ce572949bbe438de1038cbb7 monograph_work_cluster_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:918ebd67302a8d1d6e1713190e388853 serial_work_cluster_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:dae5b3a7dd01f8000d7bd6bab2ae774d unknown_work_cluster_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:a51bdf3048e00f81b4fcb252a19afdd6 work_media_type_category_init.groovy::2012-06-04::Stanislau Halauniou is now: 3:922e6e52392fc57c5983f8be9efd02e0 work_media_type_init.groovy::2012-06-04::Stanislau Halauniou is now: 3:df6de50d4d6f63dbb85aa1a5dafc4b1b article_work_weight_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:f4e147ce3e11499d41e6936d6561329e chapter_work_weight_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:4514f9cec46e4da5394d1aae20b22013 monograph_work_weight_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:c3bad504efd5872b08d152a5ddca6d28 serial_work_weight_init.groovy::2012-05-02::Stanislau Halauniou is now: 3:c612131e966e0f2040f6e39e8278c234 unknown_work_weight_init.groovy::2012-08-23::Alena Lakhava is now: 3:aa63b9aa1df5a2fc0bb249bf90d5d8d0 article_declarations_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:d153805de41a3f904f5a3ce4aff2646a article_doi_rule_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:e020f0fe8fc0ebd91862ce4a2c8e2652 article_hostissn_rule_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:bda67f8cdae5535bd74483ae1881abdf article_issue_rule_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:bdeac2f4015e9476c44d287c07108108 article_normedcontributor_rule_init.groovy::2012-05-03::Stanislau Halauniou is now: 3:7187ab567461e2991835ef7facd28b13

Was it helpful?

Solution 2

**

If multiple classes try to access same resources then it will give this error. It's always better keep them in a different package and then execute them

**

OTHER TIPS

See the documentation for database URLs.

You are using an in-memory database. Opening a second connection will get you a new database.

Instead, I suggest to use a persistent database, or a named in-memory database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top