Guest User

Untitled

a guest
Jan 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. @Override
  2. public void updateCurrentStatus(Long paymentHistoryId, String currentStatus) {
  3. StringBuilder sb = new StringBuilder( );
  4. sb.append( "update PaymentHistory SET " );
  5. sb.append( " currentStatus = :currentStatus ," );
  6. sb.append( " MODIFIEDDATETIME = CURRENT TIMESTAMP " );
  7. sb.append( "where paymentHistoryId = :paymentHistoryId " );
  8.  
  9. final Query updateQuery = getSession( ).createSQLQuery( sb.toString( ) );
  10. updateQuery.setString( "currentStatus", currentStatus );
  11. updateQuery.setLong( "paymentHistoryId", paymentHistoryId );
  12. updateQuery.executeUpdate( );
  13. }
  14.  
  15. 2018-01-16 19:56:15.379 [WebContainer : 657] ERROR c.c.i.c.a.a.ui.PaymentTrxAuthAction - [user1] - Encounter RuntimeException
  16. org.hibernate.exception.LockAcquisitionException: could not execute native bulk manipulation query
  17. at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
  18. at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
  19. at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:198) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
  20. at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1190) ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
  21. 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