-
Notifications
You must be signed in to change notification settings - Fork 283
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
3.10.0 JMS Sender needs common-collections-3 but only commons-collections4 is bundled #4435
Comments
Hello! Did you make any progress with this issue? I seem to have the same problem. |
Tested locally and found the same. Created internal issue to look into it further. Thanks for reporting! Edit: Actually, with further testing it seems to be working fine. See below for more info. |
What do you think of any work arounds? |
Upon further testing and learning more about our JMS connectors, I'm unable to encounter the error reported. I wasn't aware that the expectation was for users to add their own JMS libraries, whether it's ActiveMQ, JBoss, or whatever and that's why I was seeing errors when I ran it (I was trying to use ActiveMQ when it didn't exist). We'll add information about that to the User Guide soon! Here's my testing: I started by spinning up an ActiveMQ Docker instance for testing. Next, I added the latest ActiveMQ library (activemq-all-5.16.1.jar) to a directory resource (in this case, custom-lib). I started Connect and then I created a JMS Sender channel. I started with the ActiveMQ template and added my credentials and a queue name that corresponded with a queue on the ActiveMQ Docker instance. I then deployed the channel, sent a test message, saw no errors in Connect, and saw the message show up in the queue in the ActiveMQ Docker instance's web UI. Some things to note:
|
I'm having the same problem, any clue howto solve it, in my case I'm using OracleAQ (oracle.jms.AQjmsQueueConnectionFactory) ... [2021-03-17 09:56:35,174] ERROR (com.mirth.connect.server.channel.ErrorTaskHandler :25): com.mirth.connect.donkey.server.StartException: Failed to start channel JMSChannel (6b010c99-4370-4505-a812-8ca133010212). at java.base/java.lang.Thread.run(Unknown Source) |
Can you drop the commons-collections-3 jar file in the same resource dir as your Connection Factory Class? It doesn't use the same package names as collections4, so there shouldn't be any collisions. |
Hi @tonygermano I've tried putting "aqapi.jar commons-collections-3.2.2.jar jta.jar ojdbc8.jar" on "/opt/connect/custom-lib" and also on "/opt/connect/server-lib/oracle/" after docker restart I allways get the same error, your help is greatly appreciated, please advise how can I overcome this error, thanks in advance. |
I was able to overcome the problem downgrading to "nextgenhealthcare/connect:3.8.1". Now I'm unable to set the connection, without JNDI, I've tried everything on "Connection Properties": "url", "jdbc_connect_string", "jdbc_connect_str", "jdbc_url", ... [2021-03-22 07:30:29,383] ERROR (com.mirth.connect.server.channel.ErrorTaskHandler:25): com.mirth.connect.donkey.server.StartException: Failed to start channel Oracle AQ JMS (0e8e87c2-f13c-4b4d-9875-89311c5fd7c4).
Caused by: com.mirth.connect.donkey.server.ConnectorTaskException: Failed to establish a JMS connection
Caused by: oracle.jms.AQjmsException: IO Error: The Network Adapter could not establish the connection
Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
Caused by: java.net.UnknownHostException: null: Temporary failure in name resolution
|
I managed to make it work ...
|
@pfelixz this all should work with the correct libraries and their dependencies added as a channel library resource as I showed in the screenshots above. Did you try it this way? |
Adding to |
I have run across the same problem, but it's got nothing to do with JMS. In my case, I'm using commons-digester (provided via When commons-beanutils tries to load its own |
You can reproduce this quite easily by putting this bit of javascript code anywhere in Mirth and causing it to run:
|
@ChristopherSchultz and I worked this out in Slack. Because commons-beanutils was added to the The fix is probably to add commons-collections-3.2.2 back and add it to the manifest as well, since it is listed as a dependency of beanutils. Luckily, it has no dependencies, so the madness should end there. A workaround could be to place the file somewhere, and append it to the launcher classpath in the appropriate
|
This workaround works. I did it by placing
This allows commons-beanutils to be able to load classes from commons-collections which it turns out is fairly important. There are many classes in beanutils which end up referencing commons-collections. |
Ping. This seems like an insanely easy thing to fix: just put the commons-collections v3 library back into the package. |
This version of the library was removed in mirth 3.10.0 when collections4 was included. However, commons-beanutils has a dependency on the 3.x version. At that time, commons-beanutils was also added to the root class path, so its dependencies must also be added. See nextgenhealthcare#4435 for details.
This version of the library was removed in mirth 3.10.0 when collections4 was included. However, commons-beanutils has a dependency on the 3.x version. At that time, commons-beanutils was also added to the root class path, so its dependencies must also be added. See nextgenhealthcare#4435 for details.
When i try to use the JMS Sender in a destination i get a runtime exeception :
java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap
The class is from commons-collections-3 and not available in commons-collections4. It is used by commons-beanutils (PropertyUtilsBean).
Adding commons-collections-3 to the lib directories doesn't help.
Stacktrace:
The text was updated successfully, but these errors were encountered: