title: FlinkKafkaConsumer - Scala consume json message
body: <p>I am new to scala and flink. I am using the following code to consume a json message from a kafka stream. </p>
  
  <pre><code>object Job {
    def main(args: Array[String]) {
      val properties = new Properties()
      properties.setProperty("bootstrap.servers", "localhost:9092")
      // only required for Kafka 0.8
      properties.setProperty("zookeeper.connect", "localhost:2181")
      val topic: String = "test"
  
      val consumer = new FlinkKafkaConsumer[ObjectNode](topic, new JSONKeyValueDeserializationSchema(false), properties)
      // set up the execution environment
      val env = StreamExecutionEnvironment.getExecutionEnvironment
      val stream = env.addSource(consumer).name("opendental")
        .enableCheckpointing(5000) // checkpoint every 5000 msecs
        .print()
  
      // execute program
      env.execute("Flink Scala API Skeleton")
    }
  }
  </code></pre>
  
  <p>I am using the command <code>mvn clean package</code> to compile the scala code to a <code>.jar</code> but the build fails due to an overloaded method. This is the error</p>
  
  <pre><code>[ERROR]   (x$1: java.util.regex.Pattern,x$2: org.apache.flink.streaming.util.serialization.KeyedDeserializationSchema[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode] &lt;and&gt;
  [ERROR]   (x$1: java.util.regex.Pattern,x$2: (some other)org.apache.flink.api.common.serialization.DeserializationSchema(in &lt;none&gt;)[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode] &lt;and&gt;
  [ERROR]   (x$1: java.util.List[String],x$2: org.apache.flink.streaming.util.serialization.KeyedDeserializationSchema[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode] &lt;and&gt;
  [ERROR]   (x$1: java.util.List[String],x$2: org.apache.flink.api.common.serialization.DeserializationSchema(in &lt;none&gt;)[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode] &lt;and&gt;
  [ERROR]   (x$1: String,x$2: org.apache.flink.streaming.util.serialization.KeyedDeserializationSchema[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode] &lt;and&gt;
  [ERROR]   (x$1: String,x$2: org.apache.flink.api.common.serialization.DeserializationSchema[com.fasterxml.jackson.databind.node.ObjectNode],x$3: java.util.Properties)org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer[com.fasterxml.jackson.databind.node.ObjectNode]
  [ERROR]  cannot be applied to (String, org.apache.flink.streaming.util.serialization.JSONKeyValueDeserializationSchema, java.util.Properties)
  [ERROR]     val consumer = new FlinkKafkaConsumer[ObjectNode](topic, new JSONKeyValueDeserializationSchema(false), properties)
  [ERROR]
  </code></pre>
  
  <p>I have tried several things to resolve the overloaded method, but now I have hit a wall. </p>