Skip to content

Conversation

@ap200506-sudo
Copy link
Contributor

Problem:
PostgreSQL throws a type mismatch error when downloading bulk import output templates
because importDocumentId is passed as String or Integer, but i.id column is bigint.

Fix:

  • Cast importDocumentId to Long in BulkImportWorkbookServiceImpl.java
  • This matches PostgreSQL bigint type and resolves the error.

@IOhacker
Copy link
Contributor

@ap200506-sudo could you please add this in the commit message and in the PR title "FINERACT-2447: Bulk Import processing result file not working on Postgresql". Please make sure to squash and commit your changes (only 1 commit per PR).

Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly see my comments

@ap200506-sudo
Copy link
Contributor Author

@ap200506-sudo could you please add this in the commit message and in the PR title "FINERACT-2447: Bulk Import processing result file not working on Postgresql". Please make sure to squash and commit your changes (only 1 commit per PR).

sure

@ap200506-sudo ap200506-sudo changed the title Fix PostgreSQL bulk import download: cast importDocumentId to Long FINERACT-2447: Bulk Import processing result file not working on Postgresql Jan 23, 2026
@IOhacker
Copy link
Contributor

@ap200506-sudo execute the following command ./gradlew :fineract-provider:spotlessApply and squash and commit, make sure the commit message is the same of the PR title.

@ap200506-sudo ap200506-sudo deleted the bulk-import-pg-fix branch January 23, 2026 03:28
@ap200506-sudo ap200506-sudo restored the bulk-import-pg-fix branch January 23, 2026 03:28
@IOhacker
Copy link
Contributor

keep trying with the squash and commit it will be very common :)

@ap200506-sudo
Copy link
Contributor Author

Thanks for the feedback! Please check the PR now
Apologies for the delay

@IOhacker
Copy link
Contributor

Hi mate, please check that the PR contains the modified file :)

@ap200506-sudo
Copy link
Contributor Author

Updated

@IOhacker
Copy link
Contributor

Now lets run the Github Actions and wait for the result.

@ap200506-sudo
Copy link
Contributor Author

yes lets wait

@ap200506-sudo
Copy link
Contributor Author

Thanks for the patience and sorry for the confusion earlier.

I’ve checked the CI failure it appears that it is not caused by the PostgreSQL bulk import changes in this PR.

please let me know if you’d like me to retry the build or take any additional steps.

@adamsaghy
Copy link
Contributor

* What went wrong:
Execution failed for task ':fineract-provider:spotlessJavaCheck'.
> The following files had format violations:
      src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java
          @@ -255,7 +255,8 @@
           ········this.securityContext.authenticatedUser();
           ········final·ImportTemplateLocationMapper·importTemplateLocationMapper·=·new·ImportTemplateLocationMapper();
           ········final·String·sql·=·"select·"·+·importTemplateLocationMapper.schema();
          -········DocumentData·documentData·=·this.jdbcTemplate.queryForObject(sql,·importTemplateLocationMapper,·new·Object[]·{·Long.parseLong(importDocumentId)·});·//·NOSONAR
          +········DocumentData·documentData·=·this.jdbcTemplate.queryForObject(sql,·importTemplateLocationMapper,
          +················new·Object[]·{·Long.parseLong(importDocumentId)·});·//·NOSONAR
           ········return·buildResponse(documentData);
           ····}
           
  Run './gradlew :fineract-provider:spotlessApply' to fix these violations.

@ap200506-sudo
Copy link
Contributor Author

l have ran the ./gradlew :fineract-provider:spotlessApply command and pushed the code again
Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants