You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type userinfo.grpc.UserInfoService and qualifiers [@default] - java member: <my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc():userInfoService - declared on CLASS bean [types=[<my_package>.userinfo.UserInfoProvider, java.lang.Object, <my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc], qualifiers=[@default, @Any], target=<my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc] The following beans match by type, but none have matching qualifiers: - Bean [class=userinfo.grpc.UserInfoService, qualifiers=[@Any, @io.quarkus.grpc.GrpcClient("userInfoService")]]
It's the @lombok.AllArgsConstructor annotation that causes the problem. According to the docs it generates an all-args constructor for every field in the class. However, in Quarkus if a bean class declares a single constructor then all the arguments are considered injection points. And you can't inject a grpc client without the @GrpcClient qualifier.
Simply remove the annotation. It's not needed at all.
Describe the bug
I am trying to create gRPC client in Quarkus. Did everything according to the documentation.
Placed proto files in src/main/proto: here is the content of the service file
syntax = "proto3";
package userinfo.grpc;
import "UserInfoRequest.proto";
import "UserInfoResponse.proto";
service UserInfoService {
rpc GetUserInfo (UserInfoRequest) returns (UserInfoResponse);
}
added to gradle following dependency:
implementation 'io.quarkus:quarkus-grpc'
When I built the project I saw my gRPC classes generated in
\build\classes\java\quarkus-generated-sources\grpc\userinfo
Expected behavior
@GrpcClient injected without exceptions
Actual behavior
Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type userinfo.grpc.UserInfoService and qualifiers [@default] - java member: <my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc():userInfoService - declared on CLASS bean [types=[<my_package>.userinfo.UserInfoProvider, java.lang.Object, <my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc], qualifiers=[@default, @Any], target=<my_package>.userinfo.grpc.IdentityUserInfoProviderGrpc] The following beans match by type, but none have matching qualifiers: - Bean [class=userinfo.grpc.UserInfoService, qualifiers=[@Any, @io.quarkus.grpc.GrpcClient("userInfoService")]]
How to Reproduce?
https://github.com/denysandriyanov/reproducer
clone
build
run
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19044.3086]
Output of
java -version
17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.3.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)gradle-7.6-bin
Additional information
Thank you for looking at this
The text was updated successfully, but these errors were encountered: