Description
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO acc_gl_journal_entry(account_id,office_id,reversal_id,currency_code,transaction_id,savings_transaction_id,client_transaction_id,reversed,ref_num,manual_entry,entry_date,type_enum,amount,description,entity_type_enum,entity_id,created_date,lastmodified_date,is_running_balance_calculated,office_running_balance,organization_running_balance,payment_details_id,transaction_date,share_transaction_id, createdby_id, lastmodifiedby_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; ERROR: insert or update on table "acc_gl_journal_entry" violates foreign key constraint "FK_acc_gl_journal_entry_acc_gl_account"
Detail: Key (account_id)=(0) is not present in table "acc_gl_account".; nested exception is org.postgresql.util.PSQLException: ERROR: insert or update on table "acc_gl_journal_entry" violates foreign key constraint "FK_acc_gl_journal_entry_acc_gl_account"
Detail: Key (account_id)=(0) is not present in table "acc_gl_account".
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:251)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:691)
at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:1034)
at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:1088)
at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:1079)
at org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster.batchUpdateJournalEntries(SavingsSchedularInterestPoster.java:270)
at org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster.batchUpdate(SavingsSchedularInterestPoster.java:351)
at org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster.call(SavingsSchedularInterestPoster.java:195)
at org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster.call(SavingsSchedularInterestPoster.java:61)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "acc_gl_journal_entry" violates foreign key constraint "FK_acc_gl_journal_entry_acc_gl_account"
Detail: Key (account_id)=(0) is not present in table "acc_gl_account".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:559)
at org.postgresql.jdbc.PgStatement.internalExecuteBatch(PgStatement.java:887)
at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:910)
at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1649)
at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:127)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
at org.springframework.jdbc.core.JdbcTemplate.lambda$batchUpdate$4(JdbcTemplate.java:1048)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
... 12 common frames omitted
Attachments
Issue Links
- blocks
-
FINERACT-1680 Release Apache Fineract 1.8.0
- Resolved