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

Handler dispatch failed: java.lang.NoSuchMethodError: 'com.google.protobuf.Internal$ProtobufList io.qdrant.client.grpc.Points$Vector.makeMutableCopy(com.google.protobuf.Internal$ProtobufList)' #17

Closed
forestwanglin opened this issue Jan 8, 2024 · 1 comment

Comments

@forestwanglin
Copy link

forestwanglin commented Jan 8, 2024

I add the pom and write a test case to search points. And replace io.grpc with version 1.60.1 .

         <dependency>
            <groupId>io.qdrant</groupId>
            <artifactId>client</artifactId>
            <version>1.7.0</version>
            <exclusions>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-netty</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-stub</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-protobuf</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-services</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.grpc</groupId>
                    <artifactId>grpc-netty-shaded</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>33.0.0-jre</version>
        </dependency>

But I got the error as below.

Handler dispatch failed: java.lang.NoSuchMethodError: 'com.google.protobuf.Internal$ProtobufList io.qdrant.client.grpc.Points$Vector.makeMutableCopy(com.google.protobuf.Internal$ProtobufList)'

Search code

            Points.SearchPoints.Builder searchBuilder = Points.SearchPoints.newBuilder();
            searchBuilder.setCollectionName(COLLECTION_NAME)
                    .addAllVector(vector.stream().map(Double::floatValue).toList())
                    .setShardKeySelector(Points.ShardKeySelector.newBuilder()
                            .addShardKeys(Collections.ShardKey.newBuilder()
                                    .setKeyword(SHARD_KEY)
                                    .build())
                            .build())
                    .setLimit(topK)
                    .setScoreThreshold((float) minSimilarity)
                    .setWithPayload(Points.WithPayloadSelector.newBuilder()
                            .setEnable(true)
                            .build());
@forestwanglin
Copy link
Author

add below dependency.

        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protoc</artifactId>
            <version>${google.gprc.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${google.gprc.version}</version>
        </dependency>

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

1 participant