You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2020/06/07 10:18:00 UTC

[jira] [Commented] (FINERACT-995) Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY

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

Michael Vorburger commented on FINERACT-995:
--------------------------------------------

This also just appeared here on https://www.fineract.dev :

{noformat}org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [Select pm.product_id as productId, lp.name as name from m_product_mix pm join m_product_loan lp on lp.id=pm.product_id group by pm.product_id]; Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.; nested exception is java.sql.SQLException: Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.

        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate (SQLStateSQLExceptionTranslator.java:110)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate (AbstractFallbackSQLExceptionTranslator.java:72)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate (AbstractFallbackSQLExceptionTranslator.java:81)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate (AbstractFallbackSQLExceptionTranslator.java:81)
        at org.springframework.jdbc.core.JdbcTemplate.translateException (JdbcTemplate.java:1443)
        at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:633)
        at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java:669)
        at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java:700)
        at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java:718)
        at org.apache.fineract.portfolio.loanproduct.productmix.service.ProductMixReadPlatformServiceImpl.retrieveAllProductMixes (ProductMixReadPlatformServiceImpl.java:82)

Caused by: java.sql.SQLException: Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException (SQLError.java:129)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException (SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException (SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.result.ResultSetImpl.beforeFirst (ResultSetImpl.java:426)
        at com.zaxxer.hikari.pool.HikariProxyResultSet.beforeFirst (HikariProxyResultSet.java){noformat}

> Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY
> --------------------------------------------------------------------------
>
>                 Key: FINERACT-995
>                 URL: https://issues.apache.org/jira/browse/FINERACT-995
>             Project: Apache Fineract
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Michael Vorburger
>            Priority: Blocker
>             Fix For: 1.4.0
>
>
> See FINERACT-932 for general background. This should definitely be "fixed":
> {noformat}org.quartz.SchedulerException: Job threw an unhandled exception.
> 	at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> 	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
> Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'updateLoanArrearsAgeingDetails' on target class [class org.apache.fineract.portfolio.loanaccount.service.LoanArrearsAgingServiceImpl$$EnhancerBySpringCGLIB$$f1072374] failed; nested exception is org.springframework.dao.TransientDataAccessResourceException: StatementCallback; SQL [select ml.id as loanId, mr.duedate as dueDate, mr.principal_amount as principalAmount, mr.interest_amount as interestAmount, mr.fee_charges_amount as feeAmount, mr.penalty_charges_amount as penaltyAmount  from m_loan ml  INNER JOIN m_loan_repayment_schedule_history mr on mr.loan_id = ml.id where mr.duedate  < SUBDATE(CURDATE(),INTERVAL  ifnull(ml.grace_on_arrears_ageing,0) day) and ml.id IN(8, 9) and  mr.version = (select max(lrs.version) from m_loan_repayment_schedule_history lrs where mr.loan_id = lrs.loan_id) order by ml.id,mr.duedate]; Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.; nested exception is java.sql.SQLException: Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.
> 	at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:276)
> 	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75)
> 	at org.quartz.core.JobRunShell.run(JobRunShell.java:202){noformat}
> As per FINERACT-932, this happened on Fineract.dev, which runs with the MySQL JDBC thin driver that is part of our Docker image. It's possible that this is related to a specific JDBC Driver, and cannot be reproduced with Drizzle. IMHO we should consider FINERACT-982 (which won't fix this, but perhaps make it appear in integration testing already; worth a try at least).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)