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

Failed to install #627

Open
FreeGoldRush opened this issue Sep 12, 2023 · 4 comments
Open

Failed to install #627

FreeGoldRush opened this issue Sep 12, 2023 · 4 comments

Comments

@FreeGoldRush
Copy link

The gradle installation instructions are leaving something out that must be obvious but unstated. On Ubuntu I do:

gradle implementation 'io.milvus:milvus-sdk-java:2.3.0'

And get this below. What additional step is required?


Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Directory '/home/mike/milvus' does not contain a Gradle build.

A Gradle build should contain a 'settings.gradle' or 'settings.gradle.kts' file in its root directory. It may also contain a 'build.gradle' or 'build.gradle.kts' file.

@FreeGoldRush
Copy link
Author

I also tried this with Maven and it did not work. Here is the relevant start of errors that might offer a clue:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 119 source files to /home/mike/milvus/milvus-sdk-java/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/mike/milvus/milvus-sdk-java/src/main/java/io/milvus/param/R.java:[23,22] package io.milvus.grpc does not exist
[ERROR] /home/mike/milvus/milvus-sdk-java/src/main/java/io/milvus/client/MilvusClient.java:[117,7] cannot find symbol
symbol: class ListDatabasesResponse
location: interface io.milvus.client.MilvusClient

Many more follow. What should I have done differently? Thank you!

@yhmo
Copy link
Contributor

yhmo commented Sep 13, 2023

Maven is recommended, we didn't provide a build script for Gradle.

For the error "package io.milvus.grpc does not exist", the answer is in this issue:
#273

@FreeGoldRush
Copy link
Author

Thank you. It did compile. 109 tests. 3 failed.

Failed tests:
MilvusMultiClientDockerTest.testAsyncMethods:667 expected:<0> but was:<-3>
MilvusMultiClientDockerTest.testBinaryVectors:538 expected:<0> but was:<-3>
MilvusMultiClientDockerTest.testFloatVectors:286 expected:<0> but was:<-3>

Is this important?

@yhmo
Copy link
Contributor

yhmo commented Sep 14, 2023

The tests launch a milvus server locally. You can see there is a docker-compose.yml under the java sdk project root path.
The master&v2.3 branch uses milvus v2.3.0 to test, the v2.2 branch uses milvus v2.2.14 to test.
Sometimes the tests failed because two reasons:

  1. There is another milvus server is running, the tests failed to launch new milvus server. You can use docker ps to check. If you have milvus-lite running on the machine, you can use this script to close milvus-lite server.
  2. The "volumes" folder under the java sdk project root path contains some legacy data. Just remove the "volumes" and try again.

I just run the tests on my local, no problem:
Screenshot from 2023-09-14 11-46-16

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

2 participants