diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java index 191a89c55f..bf682ff7a1 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java @@ -966,7 +966,11 @@ public abstract class AbstractJournalStorageManager implements StorageManager { PageTransactionInfo pageTX = pagingManager.getTransaction(pageUpdate.pageTX); - pageTX.onUpdate(pageUpdate.recods, null, null); + if (pageTX == null) { + ActiveMQServerLogger.LOGGER.journalCannotFindPageTX(pageUpdate.pageTX); + } else { + pageTX.onUpdate(pageUpdate.recods, null, null); + } } else { PageTransactionInfoImpl pageTransactionInfo = new PageTransactionInfoImpl(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java index 332e8903b8..cf904e1917 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java @@ -1557,4 +1557,10 @@ public interface ActiveMQServerLogger extends BasicLogger { @Message(id = 224072, value = "Message Counter Sample Period too short: {0}", format = Message.Format.MESSAGE_FORMAT) void invalidMessageCounterPeriod(long value); + @LogMessage(level = Logger.Level.ERROR) + @Message(id = 224075, value = "Cannot find pageTX id = {0}", format = Message.Format.MESSAGE_FORMAT) + void journalCannotFindPageTX(Long id); + + + }