Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1570

Datatables creation fails on PostgreSQL

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      According to Logu, the datatable creation fails on PostgreSQL. Probably a respective automated integration test case is missing so make sure to add it to cover this scenario.

      Logu also had an ask to validate the datatable supports to store Decimal values (e.g. for amount 100.20) and DateTime types. Please add a test case for that as well.

      He attached the respective cURL commands as well:
      {{}}

      curl --location --request POST 'https://localhost:8443/fineract-provider/api/v1/codes' \ 
      --header 'Content-Type: application/json' \ 
      --header 'Fineract-Platform-TenantId: default' \ 
      --header 'Authorization: Basic bWlmb3M6cGFzc3dvcmQ=' \ 
      --data-raw '{ "name": "financial_instrument" 7}' 
      
      curl --location --request POST 'https://localhost:8443/fineract-provider/api/v1/datatables' \ 
      --header 'Content-Type: application/json' \ 
      --header 'Fineract-Platform-TenantId: default' \ 
      --header 'Authorization: Basic bWlmb3M6cGFzc3dvcmQ=' \ 
      --data-raw '{ "datatableName": "dt_autopay_details", "apptableName": "m_loan", "multiRow": true, "columns": [ { "name": "financial_instruments", "type": "Dropdown", "mandatory": false, "code": "financial_instrument" }, { "name": "date_of_payment", "type": "Date", "mandatory": false } ]}' 

      The error is:
      {{}}

      Internal Exception: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block Error Code: 0 Call: SELECT ID FROM m_appuser WHERE (ID = ?)     bind => [1 parameter bound] Query: DoesExistQuery(referenceClass=AppUser sql="SELECT ID FROM m_appuser WHERE (ID = ?)") 2022-04-01 09:01:32.101 ERROR 24407 --- [io2-8443-exec-5] .a.c.c.C.[.[.[.[.a.f.i.c.c.JerseyConfig] : Servlet.service() for servlet [org.apache.fineract.infrastructure.core.config.JerseyConfig] in context with path [/fineract-provider] threw exception [org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.10.v20211216-fe64cd39c3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block Error Code: 0 Call: SELECT ID FROM m_appuser WHERE (ID = ?)     bind => [1 parameter bound] Query: DoesExistQuery(referenceClass=AppUser sql="SELECT ID FROM m_appuser WHERE (ID = ?)")] with root cause   

       
      {{}}

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            arnold Arnold Galovics
            aleks Aleksandar Vidakovic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment