It's all about the answers!

Ask a question

How can I make Kafka Producer send message through follow up plugin?

Ludgi Eugene (133) | asked May 05 '23, 1:09 p.m.
edited May 05 '23, 1:45 p.m.

 Hi, I am having issues constructing a Kafka producer so I can send a simple Kafka message. I had no issues running the producer via Jetty Debugger running on the JRE bundled with EWM 7.0.2, but when I build the plugin and put it on my local server, I have an issue building the producer. This is the error I receive when I click save to run the followup plugin:

org.apache.kafka.common.KafkaException: Failed to construct kafka producer
at ...
Caused by: unable to find LoginModule class:

Isn't the module that it is referencing part of the JRE bundled with EWM? I thought I would see this error in the debugger if this was related to the JRE. I am not sure what would be different between what I have on the server and what's on the debugger that would have this Module class missing? Is there anything I should be considering when I use the debugger vs deploying the plugin on my local CCM?

I am running with EWM 7.0.2 on my JazzTeam Server and on Eclipse. Both run using the JRE bundled in the JazzTeam Server

One answer

permanent link
Ralph Schoon (63.3k33646) | answered May 08 '23, 2:38 a.m.

I would check the log files. I am not sure the error you show is the root cause. It is possible that your custom plugin fails to load and prevents the server from working. 

When running in the Jetty environment, a plugin has access to all the libraries available in this environment. Dependent on how you have setup the development environment you would have access to the EWM SDK, client and server, and additional libraries in the class path e.g. Kafka.

You can accidentally pick up dependencies to client code or to external libraries (e.g. Kafka API). In cases like this, your plugin does not load and prevents the server from starting. If you need external libraries in your plugin, that do not ship with EWM, you have to package the libraries in the plugin and publish it so your plugin can use it. 

I have forgotten the detailed steps, I would google for it. 

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.