ksqlDB compilation error

I am trying to compile the ksqldb code on my local machine. But doing a “mvn clean package -DskipTests” is giving the following error at module ksqldb-execution

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project ksqldb-execution: Compilation failure: Compilation failure:
[ERROR] /ksql/ksqldb-execution/src/main/java/io/confluent/ksql/execution/codegen/SqlToJavaVisitor.java:[121,43] package jdk.nashorn.internal.ir.annotations does not exist
[ERROR] /ksql/ksqldb-execution/src/main/java/io/confluent/ksql/execution/codegen/SqlToJavaVisitor.java:[187,4] cannot find symbol
[ERROR]   symbol:   class Immutable

My java version is

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Hi @sukalpo
It looks like the incorrect import was used and pushed in a recent PR. Sorry about missing that, I just opened a PR to fix it so the code should be updated shortly.

In the meantime, you can locally change the import jdk.nashorn.internal.ir.annotations.Immutable to com.google.errorprone.annotations.Immutable in CodeGenRunner, SqlToJavaVisitor, and TermCompiler. If you do this, you’ll likely need to move those imports up a line (swap with the import above) to keep lexicographical order. If you do this, your build should work


Thanks @leah for the response.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.