Most probably because, in your build.sbt, you didn't enable the
-Xexperimental compiler flag for Scala.  This is required when using Scala
2.11 (as you do) to enable SAM for Java 8 lambda support.  Because this
compiler flag is not set your build fails because it can translate
`_.toUpperCase()` into a Java 8 lambda.

See
https://github.com/confluentinc/examples/blob/kafka-0.10.0.0-cp-3.0.0/kafka-streams/pom.xml#L209-L214
.

Also, note that your build.sbt is not equivalent to your pom.xml.  For
example, the org.apache.kafka:kafka-clients dependency is missing in
build.sbt.


On Sat, Aug 27, 2016 at 2:01 PM, Tommy Go <deeplam...@gmail.com> wrote:

> Hi
>
> I am playing with kafka-streams using Scala, but found some strange issue,
> the following project compiles using mvn but failed using sbt:
>
> https://github.com/deeplambda/kstream-debug
>
> [error] /Users/tommy/tmp/kstream-debug/src/main/scala/kafka/
> streams/WordCountDemo.scala:49:
> missing parameter type for expanded function ((x$1) =>
> x$1.toUpperCase())
> [error]     val uppercasedWithMapValues: KStream[Array[Byte], String]
> = textLines.mapValues(_.toUpperCase())
> [error]
>                      ^
> [error] one error found
> [error] (compile:compileIncremental) Compilation failed
>
>
>
> Any ideas why the demo failed compiling using sbt ?
>
> Thanks,
> Tommy
>

Reply via email to