-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] JMS Listener/Reader no longer works with ActiveMQ #6111
Comments
Maybe upload a sample channel? |
The problem is using a resource to load the ActiveMQ Client library and commit fd3b7b2 changing the child classloader to take effect before the cast from the concrete |
Thank you @ab-mg-23. That was exactly the issue and doing what you've suggested has resolved my problem. |
Adding this for reference. More people are seeing this issue. https://forums.mirthproject.io/forum/mirth-connect/support/184548-jms-sender-and-activemq |
This didn't work for me. Still getting the |
Getting this exact same error. Tried copying jars into server-lib/jms with no success. Using the following jars: jakarta.jms-api-3.0.0 & activemq-client-6.1.2 Attached a screenshot of the channel settings as well! This is on Mirth 4.5.0 with a Windows 2022 Datacenter hosted by AWS. What testing was performed before this PR was approved and change was released? |
@frankparth8 You'll need to use the ActiveMQ 5.18.x version of the client. The 6.X baseline moved from |
@ab-mg-23 That seems to have done the trick! I used 5.18.4 to avoid a security issue. Also had to add hawtbuf/1.11 due to another issue that was there. Thanks for the help! |
Sure thing! Basically this was with a Windows 2022 Datacenter running Java
22. It's hard to say without your exact error but with the configuration
shown in the screenshot above I had to add the following jars to the
server-lib/jms (not custom-lib) folder: activemq-client-5.18.4 +
javax.jms-api-2.0.1 + hawtbuf-1.11
…On Wed, Jun 12, 2024 at 5:56 AM André Schulze ***@***.***> wrote:
@frankparth8 <https://github.com/frankparth8> Hello, can you please
explain in detail what you did? I've the same problem with Mirth 4.5 + Java
17 + UbuntuServer 22. I copied "activemq-all-5.18.4.jar" into
"server-lib/jms/" but it didn't solve the problem.
Thanks in advance.
—
Reply to this email directly, view it on GitHub
<#6111 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AILKKAZJ5LECR6QFQNRPIZLZHBAOJAVCNFSM6AAAAABDS3OOA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRSHE2DEMZWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*Frank Parth*
*Senior Principal Engineer Laguna Niguel, CA*
*949-426-2294*
*LinkedIn <https://www.linkedin.com/in/frank-parth-8047145a/> | ** Spinn
Solutions <http:https://spinnsolutions.com/>*
|
In 4.3.0 we added the ability to specify whether resources should load classes "child-first" or "parent-first". Previously, all resource classloaders loaded "parent-first". This meant that when a user attempted to use a class that is already included with Mirth Connect, such as a PostgreSQL driver, the class was loaded from the parent classloader instead of loading the custom version that the user wanted. The user can now achieve the desired behavior using a "child-first" classloader. We have also made "child-first" the default option. I was able to get around this error by selecting the 'Load Parent-First' on the resource tab for the activeMQ resource. |
Describe the bug
JMS Sender/Listener channels no longer work with ActiveMQ.
To Reproduce
I have several JMS Sender / Listener channels with ActiveMQ (5.15.11) working fine in Mirth 4.0.1
Now I'm trying to upgrade Mirth to 4.4.2 and when I try to send a message to ActiveMQ I get the error:
org.apache.activemq.ActiveMQConnectionFactory cannot be cast to javax.jms.ConnectionFactory
imatge.png
I've tried to downgrade to Mirth 4.3 and the error is the same, but with Mirth 4.2 it works again. Have also tired upgrading to 4.5, same problem.
Am I doing something wrong, or could it be a bug from Mirth 4.3 and above?
Anyone knows a workaround for this issue?
Expected behavior
JMS Listener and Sender can read/write messages against ActiveMQ.
Actual behavior
Channels will not even start with the following error message
Caused by: java.lang.ClassCastException: class org.apache.activemq.ActiveMQConnectionFactory cannot be cast to class javax.jms.ConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory is in unnamed module of loader com.mirth.connect.server.util.ChildFirstURLClassLo ader @17f0d6e; javax.jms.ConnectionFactory is in unnamed module of loader java.net.URLClassLoader @3970ed7e) at com.mirth.connect.connectors.jms.JmsClient.start(J msClient.java:129)
Environment (please complete the following information):
Workaround(s)
Would be intered in knowing.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: