Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9346

Exception when deploying WIH Kafka in wildfly/EAP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.44.0.Final
    • 7.43.0.Final
    • KieServer
    • None
    • False
    • False
    • NEW
    • NEW
    • Undefined
    • ---
    • ---

      After installing manually Kafka WIH defining StringSerializer as class name for key/value serializer, when deploying that unit, the following exception is raised:

      Caused by: org.apache.kafka.common.config.ConfigException: Invalid value org.apache.kafka.common.serialization.StringSerializer for configuration key.serializer: Class org.apache.kafka.common.serialization.StringSerializer could not be found.
      	at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:724)
      	at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:469)
      	at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:462)
      	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:62)
      	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:75)
      	at org.apache.kafka.clients.producer.ProducerConfig.<init>(ProducerConfig.java:365)
      	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:303)
      	at org.jbpm.process.workitem.kafka.KafkaWorkItemHandler.<init>(KafkaWorkItemHandler.java:90)
      	... 94 more
      

       exception_kafka_deploy.txt

      Though that dependency is part of the WIH:

      Finally, I could make it work by adding to kie-server.war/WEB-INF/jboss-deployment-structure.xml as dependencies:

      <module name="org.apache.kafka.clients">
      

      where that module has been added to the modules/system/layers/base/org/apache/kafka/clients/main:

      <?xml version="1.0" encoding="UTF-8"?>
      <module name="org.apache.kafka.clients" xmlns="urn:jboss:module:1.8">
          <resources>
              <resource-root path="kafka-clients-2.2.1.jar"/>
      	<resource-root path="lz4-java-1.5.0.jar"/>
          </resources>
          <dependencies>
      	<module name="javax.api"/>
              <module name="org.slf4j"/>
      	<module name="sun.jdk"/>
          </dependencies>
      </module>
      

      with following jars in that module:

      • kafka-clients-2.2.1.jar
      • lz4-java-1.5.0.jar

       

        1. exception_kafka_deploy.txt
          11 kB
          Gonzalo Muñoz Fernández
        2. Screenshot from 2020-09-14 12-02-03.png
          42 kB
          Gonzalo Muñoz Fernández

              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: