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

Juhan Aasaru edited comment on FINCN-177 at 10/15/19 4:55 AM:
--------------------------------------------------------------

This exception was caught earlier but after migration to EclipseLink the type 
has changed.

I now modified it to catch the correct exception and detect if the table is 
really gone.

The problem however remains that the transaction is rolled back and this still 
causes errors to be printed in the log. This cannot be avoided as the read is 
already part of transaction.

-In my opinion the initialization (creating of the table khepri_beats and other 
tables) should take place during application start-up (as it happens with 
provisioner).- I realised now that all the provisioning should be done through 
provisioner so deleting this idea.


was (Author: juhan):
This exception was caught earlier but after migration to EclipseLink the type 
has changed.

I now modified it to catch the correct exception and detect if the table is 
really gone.


The problem however remains that the transaction is rolled back and this still 
causes errors to be printed in the log. This cannot be avoided as the read is 
already part of transaction.

In my opinion the initialization (creating of the table khepri_beats and other 
tables) should take place during application start-up (as it happens with 
provisioner).

> rhythm throws: PSQLException: ERROR: relation "khepri_beats" does not exist
> ---------------------------------------------------------------------------
>
>                 Key: FINCN-177
>                 URL: https://issues.apache.org/jira/browse/FINCN-177
>             Project: Fineract Cloud Native
>          Issue Type: Improvement
>            Reporter: Juhan Aasaru
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> rhythm-ms_1 | Error Code: 0
> rhythm-ms_1 | Call: SELECT id, alignment_hour, application_identifier, 
> beat_identifier, next_beat, tenant_identifier FROM khepri_beats WHERE 
> (next_beat < ?) FOR UPDATE
> rhythm-ms_1 | bind => [2019-09-13 18:41:12.807]
> rhythm-ms_1 | Query: ReadAllQuery(referenceClass=BeatEntity sql="SELECT id, 
> alignment_hour, application_identifier, beat_identifier, next_beat, 
> tenant_identifier FROM khepri_beats WHERE (next_beat < ?) FOR UPDATE")
> rhythm-ms_1 | at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:676)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2056)
> rhythm-ms_1 | at 
> org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.cursorSelectAllRows(DatasourceCallQueryMechanism.java:82)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ScrollableCursorPolicy.execute(ScrollableCursorPolicy.java:83)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:476)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:460)
> rhythm-ms_1 | at 
> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
> rhythm-ms_1 | at 
> org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
> rhythm-ms_1 | ... 48 common frames omitted
> rhythm-ms_1 | Caused by: org.postgresql.util.PSQLException: ERROR: relation 
> "khepri_beats" does not exist



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

Reply via email to