我正在尝试使用Java 11.0.2编译(mvn pacakge)KSQL v5.3.1。

我在编译ksql-common时遇到以下错误:

[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ ksql-common ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.confluent.ksql.util.WelcomeMsgUtilsTest
...
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 s - in io.confluent.ksql.util.timestamp.StringToTimestampParserTest
[INFO] Running io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest
[ERROR] Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.027 s <<< FAILURE! - in io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest
[ERROR] shouldThrowIfTimestampExtractorConfigIsInvalidClass(io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest)  Time elapsed: 0.009 s  <<< FAILURE!
java.lang.AssertionError:

Expected: (an instance of io.confluent.ksql.util.KsqlException and exception with message a string containing "cannot be cast to org.apache.kafka.streams.processor.TimestampExtractor")
     but: exception with message a string containing "cannot be cast to org.apache.kafka.streams.processor.TimestampExtractor" message was "Cannot override default timestamp extractor: class io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest cannot be cast to class org.apache.kafka.streams.processor.TimestampExtractor (io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest and org.apache.kafka.streams.processor.TimestampExtractor are in unnamed module of loader 'app')"
Stacktrace was: io.confluent.ksql.util.KsqlException: Cannot override default timestamp extractor: class io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest cannot be cast to class org.apache.kafka.streams.processor.TimestampExtractor (io.confluent.ksql.util.timestamp.TimestampExtractionPolicyFactoryTest and org.apache.kafka.streams.processor.TimestampExtractor are in unnamed module of loader 'app')



帮助深表感谢;谢谢!

最佳答案

您可能想在Github上报告该问题,但是我想包装说明中包括跳过测试。

mvn package -DskipTests


否则,请随意下载Confluent Platform 5.3.1,仅配置和使用ksql属性,或使用预构建的Docker映像。

10-02 11:30