-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Infinispan client extension does not work with gradle as build tool #27318
Comments
/cc @evanchooly, @geoand, @glefloch, @karesti, @quarkusio/devtools, @wburns |
Do have a sample application you can attach so we can investigate? |
I have created a small test application, and it is available here: https://github.com/dmadunic/infinispan-quarkus-test it has both gradle and maven build tools in it. To reproduce the problem, after cloning the repo, first start infinispan server with the credentials admin/secret. Now run the following command to start the app: ./mvnw compile quarkus:dev Once the app is up invoke the url: Now run the app with the gradle as the build tool: ./gradlew clean quarkusDev and again invoke the same url:
I hope this is enough to reproduce the problem. |
Any feedback? |
we are investigating this in protostream https://issues.redhat.com/browse/IPROTO-249 |
I am not familiar with gradle but I thought you had to specify the annotation processors explicitly in the dependencies as the |
AFAIK, this is true. So should this be closed as an invalid issue? |
We are going to put a comment in the docs @geoand |
Great idea |
Describe the bug
Following the steps in the guide for quarkus-infinispan extension (https://quarkus.io/guides/infinispan-client#dependency-injection) if application is using gradle as build system, while puting an object to the cache the following error will occur:
java.lang.IllegalArgumentException: No marshaller registered for object of Java type org.acme.domain.Book : Book [authors=[Author [name=Sean, surname=Scott]], description=b, price=100, publicationYear=5, title=a]
Expected behavior
For error not to occur
Actual behavior
When an item is put into, or retrieved from a cache, you receive an IllegalArgument exception that the proto marshaller isn't registered for the class.
This happens because no protobuf marshaller classes are generated.
How to Reproduce?
Steps to reproduce the behavior:
http://localhost:8080/hello
and you should see the internal server error screen with the following exception:java.lang.IllegalArgumentException: No marshaller registered for object of Java type org.acme.domain.Book : Book [authors=[Author [name=Sean, surname=Scott]], description=b, price=100, publicationYear=5, title=a]
at org.infinispan.protostream.impl.SerializationContextImpl.getMarshallerDelegate(SerializationContextImpl.java:503)
at org.infinispan.protostream.WrappedMessage.writeMessage(WrappedMessage.java:281)
at org.infinispan.protostream.WrappedMessage.write(WrappedMessage.java:242)
...
Output of
uname -a
orver
Linux domagoj-TUXEDO-Book-XP14-Gen12 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment 18.9 (build 11.0.12+7) OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 7.4.2 ------------------------------------------------------------ Build time: 2022-03-31 15:25:29 UTC Revision: 540473b8118064efcc264694cbcaa4b677f61041 Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 11.0.12 (Oracle Corporation 11.0.12+7) OS: Linux 5.15.0-46-generic amd64
Additional information
No Marshaller classes are generated inside build/ folder. On the other hand when the same steps are repeated but with the application using maven as the build tool, all works fine.
The text was updated successfully, but these errors were encountered: