Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Connection factories can be configured via JndiJmsConnectionFactoryProvider or JMSConnectionFactoryProvider controller services for PublishJMS / ConsumeJMS.
However, some JMS client libraries may not work with the controller services. For example WebLogic JMS client throws the following exception when receiving a certain type of messages:
java.lang.ClassCastException: weblogic.diagnostics.context.DiagnosticContextImpl cannot be cast to weblogic.workarea.WorkContext
This is due to incompatible Java ClassLoader handling between the WebLogic JMS client library and NiFi. NiFi applies classloader isolation between its components. Apparently there is also classloader manipulation within the WebLogic client. These incompatible classloader switches lead to the situation that some JMS client classes are loaded by the controller service's classloader, while others by the WebLogic's custom classloader (which is a child of the processor's classloader, so it is on a different branch in the classloader hierarchy than the controller service).
The issue can be eliminated by using the processor's classloader to load the JMS client classes instead of the controller service's. This can be achieved via configuring the connection factory on the processor itself.
Attachments
Issue Links
- links to