Hey, we tried to debug the problem this afternoon/evening and have some more information.
The problem appeared on our new production email server which was running approximately for 24h before this problem. It has delivered a few hundred emails before this and there were no errors as far as we can tell. At some point, new emails have stopped arriving at their destinations but new emails were still accepted by the server. If we stop the server and copy the persisted Artemis Email queue to our staging environment and start the server, we get exactly the same error. So there has to be a problem with the persisted state of Artemis. We have exported the queue data to an XML file using the Artemis CLI with the command `data exp`. We manually looked at the emails and did not see any obvious errors in the XML file (but we are also not sure what we are looking for). Our working hypothesis is that there is some weird email at the start of the queue which can not be dequeued and thereby blocks all the other emails in the queue. However, we did not manage to remove the first email from the persisted queue while still keeping the rest of the queue intact. We tried to use the James web API but that returned the error from my last email when trying to list the content of the spool queue. Maybe somebody else has more experience with Artemis and could help us with that? Best regards, Felix Additionally, we also see this error in the logs but we are not sure whether it is related / relevant: 2026-10-19T19:37:54.962Z [WARN ] org.apache.activemq.artemis.core.client - AMQ212051: Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently. java.lang.Exception: trace at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.startCall(ClientSessionImpl.java:1492) at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:223) at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:142) at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:124) at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.doSendx(ActiveMQMessageProducer.java:483) at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:203) at org.apache.james.queue.jms.JMSCacheableMailQueue.produceMail(JMSCacheableMailQueue.java:401) at org.apache.james.queue.jms.JMSCacheableMailQueue.enQueue(JMSCacheableMailQueue.java:340) at org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.reAttemptDelivery(DeliveryRunnable.java:254) at org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.handleTemporaryFailure(DeliveryRunnable.java:226) at org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.attemptDelivery(DeliveryRunnable.java:192) at org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.lambda$processMail$0(DeliveryRunnable.java:129) at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:61) at reactor.core.publisher.Mono.subscribe(Mono.java:4576) at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Oct 19, 2026 17:32:27 Felix Auringer <[email protected]>: > Hey, > > I have a problem with the James Queue. > The Mail Spooler puts emails into the queue but they can not be dequeued. > > When James starts and loads the queue, I get the following error > > ``` > 2026-10-19T15:05:13.235Z ESC[1;31m[ERROR]ESC[0;39m > reactor.core.publisher.Operators - Operator called default onErrorDropped > java.lang.NullPointerException: Cannot read the array length because > "<parameter1>" is null > at java.base/java.io.ByteArrayInputStream.<init>(Unknown Source) > at > jakarta.mail.util.SharedByteArrayInputStream.<init>(SharedByteArrayInputStream.java:46) > at > org.apache.james.queue.jms.MimeMessageObjectMessageSource.<init>(MimeMessageObjectMessageSource.java:52) > at > org.apache.james.queue.jms.JMSCacheableMailQueue.mimeMessage(JMSCacheableMailQueue.java:466) > at > org.apache.james.queue.jms.JMSCacheableMailQueue.createMail(JMSCacheableMailQueue.java:453) > at > org.apache.james.queue.jms.JMSCacheableMailQueue.createMailQueueItem(JMSCacheableMailQueue.java:592) > at > org.apache.james.queue.jms.JMSCacheableMailQueue.deQueueOneItem(JMSCacheableMailQueue.java:298) > ... 12 common frames omitted > Wrapped by: org.apache.james.queue.api.MailQueue$MailQueueException: Unable > to dequeue next message; > nested exception is: > java.lang.NullPointerException: Cannot read the array length because > "<parameter1>" is null > at > org.apache.james.queue.jms.JMSCacheableMailQueue.deQueueOneItem(JMSCacheableMailQueue.java:312) > at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:45) > at > reactor.core.publisher.FluxRepeatPredicate$RepeatPredicateSubscriber.resubscribe(FluxRepeatPredicate.java:120) > at > reactor.core.publisher.MonoRepeatPredicate.subscribeOrReturn(MonoRepeatPredicate.java:48) > at > reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:55) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) > at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) > at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) > at java.base/java.util.concurrent.FutureTask.run(Unknown Source) > at > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.base/java.lang.Thread.run(Unknown Source) > Wrapped by: reactor.core.Exceptions$ErrorCallbackNotImplemented: > org.apache.james.queue.api.MailQueue$MailQueueException: Unable to dequeue > next message; > nested exception is: > java.lang.NullPointerException: Cannot read the array length because > "<parameter1>" is null > ``` > > This happens with James `2d7e913ff728ac1992d82c493aa9421e2abc0ea2` (Tmail > 1.0.22). > Has anybody else seen this error? > Is there any way to debug Emails in the queue? > > Best regards, > Felix > > Today from a different email address because my James server does not deliver > my emails :( --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
