Skip to main content
Participant
May 14, 2025
Question

Consistent Issue with ActiveMQ Event Service with CF2023 Upgrade

  • May 14, 2025
  • 1 reply
  • 561 views

Hello,

We are upgrading several machines from CF2021 to CF2023 and are seeing a consistent issue with each upgrade as we go in and try to turn on our ActiveMQ Gateway Instances.  The instances won't start and they are throwing what appear to be java JMS errors in the exception logs.  For instance:


"Error","Thread-30","05/14/25","09:26:32","","Failed to start gateway: null"
"Error","Thread-30","05/14/25","09:26:32","","Error starting gateway <Name of Gateway Instance>: null"
java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at java.base/java.util.Properties.put(Properties.java:1301)
at java.base/java.util.Properties.setProperty(Properties.java:229)
at examples.ActiveMQ.JMSConsumer.start(JMSConsumer.java:58)
at examples.ActiveMQ.JMSGateway.startGateway(JMSGateway.java:47)
at coldfusion.eventgateway.GenericGateway.start(GenericGateway.java:118)
at coldfusion.eventgateway.impl.EventServiceImpl$GatewayStarter.run(EventServiceImpl.java:1456)

 

AND (another example):

"Error","Thread-22","05/14/25","08:41:03","","Failed to start gateway: Unexpected failure."
"Error","Thread-22","05/14/25","08:41:03","","Error starting gateway <Name of Gateway Instance>: Unexpected failure."
javax.jms.JMSException: Unexpected failure.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:91)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1483)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1548)
at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:568)
at examples.ActiveMQ.JMSConsumer.start(JMSConsumer.java:110)
at examples.ActiveMQ.JMSGateway.startGateway(JMSGateway.java:47)
at coldfusion.eventgateway.GenericGateway.start(GenericGateway.java:118)
at coldfusion.eventgateway.impl.EventServiceImpl$GatewayStarter.run(EventServiceImpl.java:1456)
Caused by: java.io.IOException: Unexpected failure.
at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:645)
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1454)
... 6 more

 

We have tried many things, including dropping the activeMQ and artemis .jar files into the ...\wwwroot\WEB-INF\lib\ folder, resetting the Felix Cache, and multiple restarts.  We aren't having much luck.  It is odd that this seems to be a consistent issue across all of the machines that we have updated.

 

I know this is kind of a CF "edge case" and I don't see a lot of people making use of the ActiveMQ messaging but wanted to see if anyone else may have experienced this during an upgrade.

 

Thank you.

1 reply

BKBK
Community Expert
Community Expert
May 14, 2025

You might be on to something, something important. To verify, do the following:

 

  1.  Download the file javax.jms-api-2.0.1.jar  , and place a copy in ColdFusion's /lib directory.
  2.  Restart ColdFusion.

 

Does that help?

Participant
May 14, 2025

Hello, thanks for the response.  I think at some point, we actually had tried that (we've tried so many things that it is hard to keep track 🙂 ).  Anyway, I just did your suggestion and am still getting the error:

"Error","Thread-25","05/14/25","10:56:40","","Failed to start gateway: Unexpected failure."
"Error","Thread-25","05/14/25","10:56:40","","Error starting gateway <Name of Gateway Instance>: Unexpected failure."
javax.jms.JMSException: Unexpected failure.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:80)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1423)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1488)
at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:530)
at examples.ActiveMQ.JMSConsumer.start(JMSConsumer.java:110)
at examples.ActiveMQ.JMSGateway.startGateway(JMSGateway.java:47)
at coldfusion.eventgateway.GenericGateway.start(GenericGateway.java:118)
at coldfusion.eventgateway.impl.EventServiceImpl$GatewayStarter.run(EventServiceImpl.java:1456)
Caused by: java.io.IOException: Unexpected failure.
at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:645)
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1394)
... 6 more

BKBK
Community Expert
Community Expert
May 14, 2025

A suggestion: do the following test

1. Restart ColdFusion.

2. Run the following code

<cfset adminObj = new cfide.adminapi.administrator().login("your_CF_Admin_password")>
<cfset gatewayObj= new cfide.adminapi.eventgateway()>

<cfif not gatewayObj.getGatewayServiceStatus()>
	<cfset gatewayObj.setGatewayServiceStatus(true)>
</cfif>

<p>
	<cfoutput>Is the gateway service enabled? #gatewayObj.getGatewayServiceStatus()#</cfoutput>
</p>
​

 The result should be Yes.

3. In the Administrator, click on the button to start the ActiveMQ gateway instance.

4. Have a look at the logs to see whether there are any errors.