org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on "DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]". FailedObject: DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]

james-server-user | Eric Charles | 2 years ago
  1. 0

    Re: Deadlock on JPAMessageMapper.expungeMarkedForDeletionInMailbox()

    james-server-user | 2 years ago | Eric Charles
    org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on "DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]". FailedObject: DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]
  2. 0

    Re: Deadlock on JPAMessageMapper.expungeMarkedForDeletionInMailbox()

    james-server-user | 2 years ago | Eric Charles
    org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on "DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]". FailedObject: DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]
  3. 0

    Re: Deadlock on JPAMessageMapper.expungeMarkedForDeletionInMailbox()

    james-server-user | 2 years ago | Kohei Nozaki
    org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on "DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]". FailedObject: DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Deadlock on JPAMessageMapper.expungeMarkedForDeletionInMailbox()

    james-server-user | 2 years ago | Kohei Nozaki
    org.apache.openjpa.persistence.OptimisticLockException: Unable to obtain an object lock on "DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]". FailedObject: DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) [java.lang.String]
  6. 0

    Connection is closed across multiple EntityManager instances in a JEE Container

    openjpa-users | 3 years ago | Andrew Hastie
    org.apache.openjpa.lib.jdbc.ReportingSQLException: Connection closed {SELECT t0.appcode_id, t0.asRecNoMax, t0.asTableType, t0.comment, t0.creationDate, t0.CULTURE_ID, t 0.currentCycle, t0.DATASOURCE_ID, t0.dataSpecification, t0.efficiency, t0.help, t0.hostCodepage, t0.id, t0.indexReorgNeeded, t0.internalName, t0.lastModified, t0.lastModifyCommand, t0.lockTimestam p, t0.locked, t0.lockingUserID, t0.maxCycle, t0.panel, t0.password, t0.passwordProtected, t0.recordCount, t0.recordSize, t0.reservationLock, t0.reserved, t0.reservedTimestamp, t0.reservingUserID, t0.shareable, t0.tableName, t0.tableNamekey, t0.tableProtected, t0.title, t0.usable, t0.writtenTo FROM ASCENTTABLE t0 WHERE t0.id = ?} [code=0, state=null]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.openjpa.lib.jdbc.ReportingSQLException

      A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, JAMES_MAIL, (735,6) Waiting XID : {123722435, U} , APP, DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID)) Granted XID : {123722454, X} Lock : TABLE, JAMES_MAIL_PROPERTY, Tablelock Waiting XID : {123722454, IX} , APP, INSERT INTO APP.JAMES_MAIL_PROPERTY (PROPERTY_ID, PROPERTY_LINE_NUMBER, PROPERTY_LOCAL_NAME, PROPERTY_NAME_SPACE, PROPERTY_VALUE, MAILBOX_ID, MAIL_UID) VALUES (?, ?, ?, ?, ?, ?, ?) Granted XID : {123722435, X} . The selected victim is XID : 123722435. {prepstmnt 239961255 DELETE FROM APP.JAMES_MAIL WHERE EXISTS (SELECT 1 FROM APP.JAMES_MAIL t0 WHERE (t0.MAILBOX_ID = ? AND t0.MAIL_UID = ? AND t0.MAIL_IS_DELETED = ?) AND (t0.MAILBOX_ID = APP.JAMES_MAIL.MAILBOX_ID AND t0.MAIL_UID = APP.JAMES_MAIL.MAIL_UID))} [code=30000, state=40001]

      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap()
    2. OpenJPA Aggregate Jar
      QueryImpl.executeUpdate
      1. org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219)
      2. org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:195)
      3. org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:59)
      4. org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1134)
      5. org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:272)
      6. org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1765)
      7. org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeUpdate(JDBCStoreQuery.java:746)
      8. org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeBulkOperation(JDBCStoreQuery.java:577)
      9. org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4940)
      10. org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4918)
      11. org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
      12. org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
      13. org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeBulkOperation(JDBCStoreQuery.java:579)
      14. org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeDelete(JDBCStoreQuery.java:491)
      15. org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeDelete(ExpressionStoreQuery.java:789)
      16. org.apache.openjpa.kernel.QueryImpl.delete(QueryImpl.java:1025)
      17. org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:865)
      18. org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:892)
      19. org.apache.openjpa.kernel.DelegatingQuery.deleteAll(DelegatingQuery.java:574)
      20. org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:374)
      20 frames
    3. org.apache.james
      JPAMessageMapper.expungeMarkedForDeletionInMailbox
      1. org.apache.james.mailbox.jpa.mail.JPAMessageMapper.deleteDeletedMessagesInMailboxWithUID(JPAMessageMapper.java:378)
      2. org.apache.james.mailbox.jpa.mail.JPAMessageMapper.expungeMarkedForDeletionInMailbox(JPAMessageMapper.java:240)
      2 frames