Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD FAILD #1

Open
cailurus opened this issue Feb 26, 2018 · 15 comments
Open

BUILD FAILD #1

cailurus opened this issue Feb 26, 2018 · 15 comments

Comments

@cailurus
Copy link

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
Copy link

mrox commented Apr 3, 2018

same error

@xemose
Copy link

xemose commented Jul 16, 2018

same error, please help

@tknobi
Copy link

tknobi commented Jul 24, 2018

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
Copy link

xemose commented Jul 25, 2018

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
Copy link

tknobi commented Jul 25, 2018

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
Copy link

jelmerk commented Aug 2, 2018

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

@edmarsj
Copy link

edmarsj commented Aug 23, 2018

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
Copy link

xemose commented Aug 29, 2018

Can anyone verify that the solution above works?

@saiaman
Copy link

saiaman commented Sep 17, 2018

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

@xemose
Copy link

xemose commented Sep 19, 2018

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
Copy link

wmelton commented Sep 21, 2018

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
Copy link

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
Copy link

wmelton commented Oct 23, 2018

@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
Copy link

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
Copy link

wmelton commented Oct 27, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants