You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Francis Guchie (Jira)" <ji...@apache.org> on 2022/07/07 07:39:00 UTC

[jira] [Comment Edited] (FINERACT-1660) Cannot dump a fineract_default database from one deployment to another

    [ https://issues.apache.org/jira/browse/FINERACT-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563610#comment-17563610 ] 

Francis Guchie edited comment on FINERACT-1660 at 7/7/22 7:38 AM:
------------------------------------------------------------------

[~ikimbrah] [~rrpawar]  [~arnold] 
I hope am not crazy thinking that the caps on the these 2 tables are creating the challenge at booting apache fineract

this is what i think
1- On Linux after the initial deployment on an empty DB, the 2  tables are created with UPPER CASE letters  
!image-2022-07-07-10-30-32-801.png|width=327,height=142!
2- On a Windows PC after the initial deployment on an empty DB, the 2  tables are created with lowercase letters
!image-2022-07-07-10-31-41-031.png!
Looks like during springboot, is liquibase is looking for UPPER cased table names when i look at the log here below

06-Jul-2022 10:58:13.114 INFO [main] liquibase.lockservice.null Successfully acquired change log lock
06-Jul-2022 10:58:15.995 INFO [main] liquibase.changelog.null 
*Creating database history table with name: fineract_tenants.DATABASECHANGELOG*
06-Jul-2022 10:58:16.014 INFO [main] liquibase.changelog.null 
*Reading from fineract_tenants.DATABASECHANGELOG*
Running Changeset: db/changelog/tenant-store/parts/0001_initial_schema.xml::1::fineract
06-Jul-2022 10:58:16.812 INFO [main] liquibase.lockservice.null Successfully released change log lock
2022-07-06 10:58:16.822  WARN 6665 — [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'platformUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository' defined in org.apache.fineract.useradministration.domain.AppUserRepository defined in @EnableJpaRepositories declared on JPAConfig: Cannot create inner bean '(inner bean)#2ecc8a8c' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2ecc8a8c': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantDatabaseUpgradeService' defined in URL [jar:file:/usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar!/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.class]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error while migrating the schema

this goes on for fineract_tenants and fineract_default 


was (Author: francisguchie):
[~ikimbrah] [~rrpawar]  [~arnold] 
I hope am not crazy thinking that the caps on the these 2 tables are creating the challenge since 

this is what i think
1- On Linux after the initial deployment on an empty DB, the 2  tables are created with UPPER CASE letters  
!image-2022-07-07-10-30-32-801.png|width=327,height=142!
2- On a Windows PC after the initial deployment on an empty DB, the 2  tables are created with lowercase letters
!image-2022-07-07-10-31-41-031.png!
Looks like during springboot, is liquibase is looking for UPPER cased table names when i look at the log here below

06-Jul-2022 10:58:13.114 INFO [main] liquibase.lockservice.null Successfully acquired change log lock
06-Jul-2022 10:58:15.995 INFO [main] liquibase.changelog.null 
*Creating database history table with name: fineract_tenants.DATABASECHANGELOG*
06-Jul-2022 10:58:16.014 INFO [main] liquibase.changelog.null 
*Reading from fineract_tenants.DATABASECHANGELOG*
Running Changeset: db/changelog/tenant-store/parts/0001_initial_schema.xml::1::fineract
06-Jul-2022 10:58:16.812 INFO [main] liquibase.lockservice.null Successfully released change log lock
2022-07-06 10:58:16.822  WARN 6665 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'platformUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository' defined in org.apache.fineract.useradministration.domain.AppUserRepository defined in @EnableJpaRepositories declared on JPAConfig: Cannot create inner bean '(inner bean)#2ecc8a8c' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2ecc8a8c': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantDatabaseUpgradeService' defined in URL [jar:file:/usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar!/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.class]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error while migrating the schema

this goes on for fineract_tenants and fineract_default 

> Cannot dump a fineract_default database from one deployment to another
> ----------------------------------------------------------------------
>
>                 Key: FINERACT-1660
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1660
>             Project: Apache Fineract
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>            Reporter: Francis Guchie
>            Assignee: Arnold Galovics
>            Priority: Major
>         Attachments: image-2022-07-07-10-21-04-727.png, image-2022-07-07-10-30-32-801.png, image-2022-07-07-10-31-41-031.png
>
>
> As a user i should be able to create 2 different servers one for production and another for data migrations
> then after data migration i should be able to dump the migrated data to the production server
> However i am faced with errors during boot up. 
> [~arnold]  [~rrpawar]  [~ikimbrah]  [~kigred.developer] 
> Please note the following 
> the Migration server is a windows 10 PC and the Production server is an Ubuntu 2004lts Linux Server
> !image-2022-07-07-10-21-04-727.png|width=665,height=363!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)