[ https://issues.apache.org/jira/browse/FINERACT-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksandar Vidakovic updated FINERACT-1875: ------------------------------------------- Fix Version/s: 1.10.0 (was: 1.9.0) > Operation requires a scrollable ResultSet, but this ResultSet is > FORWARD_ONLY. Postgres > --------------------------------------------------------------------------------------- > > Key: FINERACT-1875 > URL: https://issues.apache.org/jira/browse/FINERACT-1875 > Project: Apache Fineract > Issue Type: Bug > Components: Loan > Affects Versions: 1.8.3 > Environment: Local: > - Ubuntu 22.04 > - Postgresql 14.6 > Server: > - Ubuntu 20.04 > - Postgresql 14.6 > - Tomcat 9.0.71 > Reporter: Richard Matovu > Priority: Critical > Labels: postgresql, resultset, scrollable_resultset > Fix For: 1.10.0 > > > 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: > {code:java} > 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 > {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)