apache / apache/activemq

ActiveMQ Issue Reproduced – Similar to AMQ-6594. NUll Pointer Exception

Open
#1,975 1 comment 0 reactions 1 assignee Claimed by @jbonofre View on GitHub
Dominant language
Java
Stars
2.5k
Forks
1.5k
Avg merge
10h 46m
Merged PRs (30d)
79

Description

I have encountered and successfully reproduced an issue in my application that appears to be similar to AMQ-6594. https://issues.apache.org/jira/browse/AMQ-6594

It is occurring everytime in my logs

Logs:
2026-04-20T11:43:06.242794Z, warning, , [NTFDispatcherThreadPool-thread-3465] [CustomMessageListener:refreshConnectionUntilSuccessful:982] | Could not refresh JMS Connection for destination 'HSS-RR-DEFAULT13' - retrying in 5000 ms. Cause: Error while attempting to add new Connection to the pool; nested exception is java.lang.NullPointerException: Cannot invoke "org.apache.activemq.jms.pool.ConnectionPool.incrementReferenceCount()" because "connection" is null

jakarta.jms.JMSException: Error while attempting to add new Connection to the pool

at org.apache.activemq.jms.pool.PooledConnectionFactory.createJmsException(PooledConnectionFactory.java:312)

at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:231)

at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:210)

at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:208)

at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:434)

at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:416)

at notifs.messaging_camel.wrapper.CustomMessageListener.refreshConnectionUntilSuccessful(CustomMessageListener.java:963)

at notifs.messaging_camel.wrapper.CustomMessageListener.recoverAfterListenerSetupFailure(CustomMessageListener.java:942)

at notifs.messaging_camel.wrapper.CustomMessageListener$AsyncMessageListenerInvoker.run(CustomMessageListener.java:1113)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)

at java.base/java.lang.Thread.run(Thread.java:1583)

Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.activemq.jms.pool.ConnectionPool.incrementReferenceCount()" because "connection" is null

at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:229)

... 10 more

Versions :

JDK – 21
activeMQVersion = '6.2.0'
camelVersion = '4.18.0'
spring-7.0.2

Can u please let us know in version do we have the fix for this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.