Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,975 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@jbonofre is already working on this.

Since Apr 28, 2026.

Assessment

This issue has not been assessed yet.

Description

Stale

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?

Dominant language
Java
Stars
2.5k
Forks
1.5k
Avg merge
14h 42m
Merged PRs (30d)
85

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/activemq

All issues in apache/activemq

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.