instaclustr / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
33 stars 19 forks source link

Problem to build cassandra-lucene-index 4.1.0 #8

Closed A-Lynch closed 2 years ago

A-Lynch commented 2 years ago

Hi

I've been following the instructions on how to build the plug and I'm have a Java exception error - See Below and attached

Is anyone able to tell me what I'm doing wrong as I've tried this on both Windows and the Linux server I have?


[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.4.0:compile (scala-compile-first) on project cassandra-lucene-index-plugin: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.4.0:compile failed: An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.4.0:compile: java.lang.NoSuchMethodError: 'java.io.OutputStream org.fusesource.jansi.AnsiConsole.wrapOutputStream(java.io.OutputStream)'

C:\Laptop\Source\Cassandra\cassandra-lucene-index>java -version java version "1.8.0_333" Java(TM) SE Runtime Environment (build 1.8.0_333-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)

C:\Laptop\Source\Cassandra\cassandra-lucene-index>javac -version javac 18.0.1.1

C:\Laptop\Source\Cassandra\cassandra-lucene-index>mvn -version Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: C:\Maven\apache-maven-3.8.6 Java version: 18.0.1.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-18.0.1.1 Default locale: en_GB, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Full Error File Error.txt

smiklosovic commented 2 years ago

Hi @A-Lynch ,

So if I read it correctly, your java is of version 1.8 but your javac is of version 18? And Maven runs on 18 too? I do not think that the plugin supports Java 18 and I do not think that Java 18 is supported in Cassandra either. I think the solution is to be sure that you have 1.8 compiler instead of Java 18.

HTH

A-Lynch commented 2 years ago

Hi @smiklosovic

Thanks, I now have the version both on 1.8 but still no luck. any ideas are greatly appreciated!

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Cassandra Lucene index 4.0.1-1.0.0: [INFO] [INFO] Cassandra Lucene index ............................. SUCCESS [ 5.453 s] [INFO] Cassandra Lucene Index builder ..................... SUCCESS [ 24.265 s] [INFO] Cassandra Lucene Index plugin ...................... FAILURE [ 49.631 s] [INFO] Cassandra Lucene Index acceptance tests ............ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:19 min [INFO] Finished at: 2022-06-30T12:23:26+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.4.0:compile (scala-compile-first) on project cassandra-lucene-index-plugin: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.4.0:compile failed: An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.4.0:compile: java.lang.NoSuchMethodError: org.fusesource.jansi.AnsiConsole.wrapOutputStream(Ljava/io/OutputStream;)Ljava/io/OutputStream;

smiklosovic commented 2 years ago

@A-Lynch I am out of ideas.

Why do you try to build it manually? Built jars / artifacts are here

https://github.com/instaclustr/cassandra-lucene-index/releases

A-Lynch commented 2 years ago

Hi @smiklosovic

I downgraded maven to 3.5.0 and was able to build successfully