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

Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY. Postgres

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.8.3
    • 1.10.0
    • Loan
    • Local:
      - Ubuntu 22.04
      - Postgresql 14.6

      Server:
      - Ubuntu 20.04
      - Postgresql 14.6
      - Tomcat 9.0.71
    • Important

    Description

      Under tax components and tax groups, when you have created more than one record of either, and you do a fetch, it throws an error the following error:

      2023-01-27 17:41:16.378 -ERROR 22641  --- [nio-443-exec-26] o.s.b.w.servlet.support.ErrorPageFilter  : Forwarding to error page from request [/api/v1/taxes/group] due to exception [org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select tg.id as id, tg.name as name,tgm.id as mappingId,tc.id as taxComponentId, tc.name as taxComponentName,tgm.start_date as startDate, tgm.end_date as endDate  from m_tax_group tg  inner join m_tax_group_mappings tgm on tgm.tax_group_id = tg.id  inner join m_tax_component tc on tc.id = tgm.tax_component_id ]; SQL state [24000]; error code [0]; Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.; nested exception is org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.]
      javax.servlet.ServletException: org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select tg.id as id, tg.name as name,tgm.id as mappingId,tc.id as taxComponentId, tc.name as taxComponentName,tgm.start_date as startDate, tgm.end_date as endDate  from m_tax_group tg  inner join m_tax_group_mappings tgm on tgm.tax_group_id = tg.id  inner join m_tax_component tc on tc.id = tgm.tax_component_id ]; SQL state [24000]; error code [0]; Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.; nested exception is org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)    ...Caused by: org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select tg.id as id, tg.name as name,tgm.id as mappingId,tc.id as taxComponentId, tc.name as taxComponentName,tgm.start_date as startDate, tgm.end_date as endDate  from m_tax_group tg  inner join m_tax_group_mappings tgm on tgm.tax_group_id = tg.id  inner join m_tax_component tc on tc.id = tgm.tax_component_id ]; SQL state [24000]; error code [0]; Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.; nested exception is org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.    at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1542)    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:465)    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:475)    at org.apache.fineract.portfolio.tax.service.TaxReadPlatformServiceImpl.retrieveAllTaxGroups(TaxReadPlatformServiceImpl.java:80)    at org.apache.fineract.portfolio.tax.api.TaxGroupApiResource.retrieveAllTaxGroups(TaxGroupApiResource.java:91)    at jdk.internal.reflect.GeneratedMethodAccessor317.invoke(Unknown Source)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    ...Caused by: org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.    at org.postgresql.jdbc.PgResultSet.checkScrollable(PgResultSet.java:316)    at org.postgresql.jdbc.PgResultSet.previous(PgResultSet.java:993)    at com.zaxxer.hikari.pool.HikariProxyResultSet.previous(HikariProxyResultSet.java)    at org.apache.fineract.portfolio.tax.service.TaxReadPlatformServiceImpl$TaxGroupMapper.mapRow(TaxReadPlatformServiceImpl.java:226)    at org.apache.fineract.portfolio.tax.service.TaxReadPlatformServiceImpl$TaxGroupMapper.mapRow(TaxReadPlatformServiceImpl.java:199)    at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:94)    at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:61)    at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:453)    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)    ... 150 common frames omitted
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmatovu987 Richard Matovu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: