Cmak: sbt compile error

Created on 19 Feb 2020  路  3Comments  路  Source: yahoo/CMAK

git clone the newest code with master branch
then i type ./sbt clean dist to compile
then i got below errors, anyone encounter this?
java version "1.8.0_181"

[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Main Scala API documentation to /opt/CMAK-master/target/scala-2.12/api...
[info] LESS compiling on 1 source(s)
[info] Compiling 131 Scala sources and 2 Java sources to /opt/CMAK-master/target/scala-2.12/classes ...
[error] /opt/CMAK-master/app/kafka/manager/actor/cluster/KafkaStateActor.scala:102:29: type mismatch;
[error] found : java.util.Map[_$1,_$2] where type _$2, type _$1
[error] required: java.util.Map[? <: Object, ? <: Object]
[error] Note: _$1 >: ? <: Object, but Java-defined trait Map is invariant in type K.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] Note: _$2 >: ? <: Object, but Java-defined trait Map is invariant in type V.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] cp => props.putAll(cp.asMap)
[error] ^
[error] /opt/CMAK-master/app/kafka/manager/actor/cluster/KafkaStateActor.scala:265:29: type mismatch;
[error] found : java.util.Map[_$1,_$2] where type _$2, type _$1
[error] required: java.util.Map[? <: Object, ? <: Object]
[error] Note: _$1 >: ? <: Object, but Java-defined trait Map is invariant in type K.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] Note: _$2 >: ? <: Object, but Java-defined trait Map is invariant in type V.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] cp => props.putAll(cp.asMap)
[error] ^
[error] /opt/CMAK-master/app/kafka/manager/actor/cluster/KafkaStateActor.scala:102:29: type mismatch;
[error] found : java.util.Map[_$1,_$2] where type _$2, type _$1
[error] required: java.util.Map[? <: Object, ? <: Object]
[error] Note: _$1 >: ? <: Object, but Java-defined trait Map is invariant in type K.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] Note: _$2 >: ? <: Object, but Java-defined trait Map is invariant in type V.
[error] You may wish to investigate a wildcard type such as _ >: ? <: Object. (SLS 3.2.10)
[error] cp => props.putAll(cp.asMap)
.......

Most helpful comment

It seems that you are building with Java 8, which seems to be no longer supported since CMAK 3.x. Try building with Java 11.

All 3 comments

It seems that you are building with Java 8, which seems to be no longer supported since CMAK 3.x. Try building with Java 11.

It seems that you are building with Java 8, which seems to be no longer supported since CMAK 3.x. Try building with Java 11.

thanks bro, i'll try it.

it works, appreciate again! @severun

Was this page helpful?
0 / 5 - 0 ratings