Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.12.0, 5.12.1, 5.13.0, 5.12.2, 5.13.1, 5.13.3, 5.13.4, 5.14.0, 5.14.1
-
None
-
Red Hat Enterprise Linux Server release 6.8 (Santiago)
openjdk version "1.8.0_121"
camel - 2.14.0
activemq-5.13.4
spring-3.1.2
Description
I'm upgrading my activemq from 5.10.2 to 5.13.4, but I've run into an issue
with PooledConnectionFactory. It works fine at first, but when the broker is
restarted and clients try to reconnect the factory throws
NullPointerExceptions and clients cannot connect. For regular clients I had
to switch to regular factory, and it works fine, but for my camel clients I
need the pooled factory.
When I replace activemq-jms-pool-5.13.4.jar with 5.10.2, it works fine again
every time.
I have not seen any related bugs reported anywhere except for camel forum:http://camel.465427.n5.nabble.com/NullPointer-org-apache-camel-component-jms-DefaultJmsMessageListenerContainer-td5788071.html
I've done binary search on releases replacing activemq-jms-pool jars and it seens that it works in all releases from 5.10.2 to 5.11.4, and throws NPEs in all releases after 5.12.0.
Traceback:
2017-01-27 15:44:58,875 [Service.uplinkCommsHubConfig.queue]] WARN ultJmsMessageListenerContainer - Could not refresh JMS Connection for destination 'CommsHubConfigService.uplinkCommsHubConfig.queue?consumer.prefetchSize=0' - retrying in 5000 ms. Cause: Error while attempting to add new Connection to the pool
javax.jms.JMSException: Error while attempting to add new Connection to the pool
at org.apache.activemq.jms.pool.PooledConnectionFactory.createJmsException(PooledConnectionFactory.java:266)
at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:225)
at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:204)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:404)
at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:389)
at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:869)
at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:851)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:982)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:223)
... 10 more