muhleder / elasticsearch-vector-scoring

Apache License 2.0
36 stars 16 forks source link

BUILD FAILD #1

Open cailurus opened 6 years ago

cailurus commented 6 years ago

Hi there,

I'm new to Java and I was trying to build this plugin by gradle.

FAILURE: Build failed with an exception.

  • Where: Build file '/home/pio/elasticsearch-vector-scoring/build.gradle' line: 20

  • What went wrong: A problem occurred evaluating root project 'elasticsearch-vector-scoring'.

    Could not find method esplugin() for arguments [build_a99aaihyvbje55wmbun8h7hhn$_run_closure1@5441371b] on root project 'elasticsearch-vector-scoring' of type org.gradle.api.Project.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s

Any suggestion? Thanks

mrox commented 6 years ago

same error

xemose commented 6 years ago

same error, please help

tknobi commented 6 years ago

Hey @mrox and @xemose, i just had the same issue, you need to clone this repo in the elasticsearch plugin folder. Steps to reproduce:

git clone https://github.com/elastic/elasticsearch.git
cd elasticsearch
git checkout v6.3.1 # <- or whatever your version is
cd plugins
git clone https://github.com/muhleder/elasticsearch-vector-scoring.git 
cd elasticsearch-vector-scoring/
gradle clean assemble
elasticsearch-plugin install file:///path/to/iplugin/build/distribution/FILENAME.zip

I had some other problems to solve (openjdk version, set JAVA_HOME, gradle version) but now its building.

xemose commented 6 years ago

The post above me should be the install instructions for this repository.

Thank you so much!

P.S what JDK version did you use? 10.0.2 isn't working...


For 10.0.2 this error pops up

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing

> Task :buildSrc:compileGroovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/root/.gradle/caches/4.9/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :buildSrc:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/root/.gradle/caches/4.9/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Configure project :benchmarks
=======================================
Elasticsearch Build Hamster says Hello!
=======================================
  Gradle Version        : 4.9
  OS Info               : Linux 4.9.0-6-amd64 (amd64)
  JDK Version           : Oracle Corporation 10.0.2 [Java HotSpot(TM) 64-Bit Server VM 10.0.2+13]
  JAVA_HOME             : /usr/lib/jvm/jdk-10.0.2
  Random Testing Seed   : 7B65F46E0CA8D1B3

FAILURE: Build failed with an exception.

* Where:
Build file '/root/elasticsearch/client/rest/build.gradle' line: 23

* What went wrong:
A problem occurred evaluating project ':client:rest'.
> java.lang.AbstractMethodError (no error message)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 12s
tknobi commented 6 years ago

I had the same problem and i solved it by using gradle v4.7, not 4.9: See this issue for more information.

My versions:

=======================================
Elasticsearch Build Hamster says Hello!
=======================================
  Gradle Version        : 4.7
  OS Info               : Linux 4.15.0-29-generic (amd64)
  JDK Version           : Oracle Corporation 10.0.1 [OpenJDK 64-Bit Server VM 10.0.1+10-Ubuntu-3ubuntu1]
  JAVA_HOME             : /usr/lib/jvm/java-11-openjdk-amd64
jelmerk commented 6 years ago

you can use ../../gradlew from the plugins folder

edmarsj commented 6 years ago

You can also change the build.gradle file, so this way you don't need to checkout the Elasticsearch project:

buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {        
        classpath "org.elasticsearch.gradle:build-tools:6.3.2"
    }
}

apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'elasticsearch.esplugin'

licenseFile = rootProject.file('LICENSE')
noticeFile = rootProject.file('NOTICE')

esplugin {
  name 'elasticsearch-vector-scoring'
  description 'Provides a fast vector multiplication script.'
  classname 'com.gosololaw.elasticsearch.VectorScoringPlugin'
}

dependencies {
  compile "org.elasticsearch:elasticsearch:6.3.2"
}

Just run gradle clean assemble and everything should work fine.

xemose commented 6 years ago

Can anyone verify that the solution above works?

saiaman commented 6 years ago

Same can't build : anyway to build some zip releases please ? i need for v6.2.4 ?

xemose commented 6 years ago

Same can't build : anyway to build some zip releases please ? i need for v6.2.4 ?

Try updating your Elasticsearch to the latest version. At the time of writing this, the latest version was 6.4.0.

On Elasticsearch version 6.3.2, I got it to compile using @knoblochtobias solution above.

Edit: You do need a specific JDK version, so I would recommend a fresh installation. Debian 9 wouldn't acknowledge the new Java version. Updating the PATH in the system didn't work.

wmelton commented 6 years ago

For those running 6.4.x+ we've created a port from lior-k's original libary that used the new ScoreScript class. Is not backwards compatible < 6.4. https://github.com/StaySense/fast-cosine-similarity

cakirmuha commented 6 years ago

Same can't build : anyway to build some zip releases please ? i need for v6.2.4 ?

I am currently using v6.2.4, solution given by @edmarsj works.

wmelton commented 6 years ago

@cakirmuha Is upgrading to 6.4 an option? If so, the plugin we ported is already compiled in the repo and ready for installation. It won't work <6.4 though.

cakirmuha commented 6 years ago

Thanks @wmelton, but as I said, I am currently using v6.2.4 in production environment, and this plugin works for me. I don't want to upgrade to 6.4 :)

wmelton commented 6 years ago

Understood - upgrade would likely be your least painful path to the result you’re wanting.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Muhammet Çakır notifications@github.com Sent: Saturday, October 27, 2018 6:28 AM To: muhleder/elasticsearch-vector-scoring Cc: Wes; Mention Subject: Re: [muhleder/elasticsearch-vector-scoring] BUILD FAILD (#1)

Thanks @wmeltonhttps://github.com/wmelton, but as I said, I am currently using v6.2.4 in production environment, and this plugin works for me. I don't want to upgrade to 6.4 :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/muhleder/elasticsearch-vector-scoring/issues/1#issuecomment-433609150, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABePvZa7eVy2_b2lYX9rDCvzT6WUIR6Uks5upDVngaJpZM4SSujd.