Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2673

Missing argument for [threadAssociatedWithAnotherTransaction] i18n key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.4.0.Final
    • None
    • None
    • None
    • Hide
      1. Begin a user transaction.
      2. Wait enough for the transaction reaper (e.g. the one that comes with Arjuna JTA) to terminate the active transaction. The default timeout is 60 seconds.
      3. Perform some kind of JCR call that requires a transaction.
      4. Get an error on an attempt to generate a WARN log entry.
      Show
      Begin a user transaction. Wait enough for the transaction reaper (e.g. the one that comes with Arjuna JTA) to terminate the active transaction. The default timeout is 60 seconds. Perform some kind of JCR call that requires a transaction. Get an error on an attempt to generate a WARN log entry.

      Using the latest 5.4-SNAPSHOT of ModeShape, I am getting the following exception when dealing with aborted user transactions, where transaction reaper terminates an active transaction from a background thread. It appears that the message used to warn the user about the problem is missing an argument (or it expects an extra one that should not be necessary):

      LOGGER.warn(RelationalProviderI18n.threadAssociatedWithAnotherTransaction, activeTx, id);
      
      java.lang.IllegalArgumentException: Internationalization field "threadAssociatedWithAnotherTransaction" in class org.modeshape.persistence.relational.RelationalProviderI18n: 2 parameters supplied, but 3 parameters required: "The current thread '{0}' is already associated with transaction '{1}' instead of '{2}'; this may indicate a rollback was performed off another thread" => "The current thread '1a5496fb-183e-4241-9b99-f1fc8e617a71' is already associated with transaction '137021ee-0fd9-446c-9dd6-cf95d9a62c5f' instead of '{2}"
      	at org.modeshape.common.i18n.I18n.text(I18n.java:414)
      	at org.modeshape.common.logging.slf4j.SLF4JLoggerImpl.warn(SLF4JLoggerImpl.java:86)
      	at org.modeshape.persistence.relational.RelationalDb.txStarted(RelationalDb.java:310)
      	at org.modeshape.jcr.txn.Transactions$BaseTransaction.started(Transactions.java:429)
      	at org.modeshape.jcr.txn.Transactions.begin(Transactions.java:183)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:668)
      	at org.modeshape.jcr.RepositoryLockManager.unlock(RepositoryLockManager.java:479)
      	at org.modeshape.jcr.RepositoryLockManager.unlock(RepositoryLockManager.java:447)
      	at org.modeshape.jcr.JcrLockManager.unlock(JcrLockManager.java:305)
      	at org.modeshape.jcr.JcrLockManager.unlock(JcrLockManager.java:283)
      

            Unassigned Unassigned
            illia.khokholkov Illia Khokholkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: