Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void updateCurrentStatus(Long paymentHistoryId, String currentStatus) {
- StringBuilder sb = new StringBuilder( );
- sb.append( "update PaymentHistory SET " );
- sb.append( " currentStatus = :currentStatus ," );
- sb.append( " MODIFIEDDATETIME = CURRENT TIMESTAMP " );
- sb.append( "where paymentHistoryId = :paymentHistoryId " );
- final Query updateQuery = getSession( ).createSQLQuery( sb.toString( ) );
- updateQuery.setString( "currentStatus", currentStatus );
- updateQuery.setLong( "paymentHistoryId", paymentHistoryId );
- updateQuery.executeUpdate( );
- }
- 2018-01-16 19:56:15.379 [WebContainer : 657] ERROR c.c.i.c.a.a.ui.PaymentTrxAuthAction - [user1] - Encounter RuntimeException
- org.hibernate.exception.LockAcquisitionException: could not execute native bulk manipulation query
- at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
- at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
- at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:198) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
- at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1190) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
- at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:357) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
Add Comment
Please, Sign In to add comment