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
I've been working for a few months on a Spring Petclinic fork based on Quakus. It uses almost all the Spring extensions provided by Quarkus : Spring DI, Spring Web, Spring Data JPA, Spring Cache and Spring Boot
I've noticed a difference in behaviour between the Gradle and Maven builds of my quarkus-spring-petclinic application.
The Maven build succeeds. The Gradle build fails. I don't know why?
Both build configurations should be using the same Quarlus artifact versions.
Expected behavior
With the same Java base code, gradle and maven build should produces the same behaviour.
Caused by: java.lang.RuntimeException: '@FormParam' and '@RestForm' can only be used on methods annotated with '@Consumes(MediaType.MULTIPART_FORM_DATA)''@Consumes(MediaType.APPLICATION_FORM_URLENCODED)'. Offending method is 'org.springframework.samples.petclinic.owner.OwnerRepositoryJaxRs_67b39fdc404ae23c4212d0aee4054338ea689aef#jakarta.ws.rs.core.Response add(org.springframework.samples.petclinic.owner.Owner entity, jakarta.ws.rs.core.UriInfo uriInfo)'
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:686)
... 13 more
"'@FormParam' and '@RestForm' can only be used on methods annotated with '@Consumes(MediaType.MULTIPART_FORM_DATA)' '@Consumes(MediaType.APPLICATION_FORM_URLENCODED)'. Offending method is "
To temporary fix the Gradle build error, you could try to remove the 4 @FormParam annotations from the Owner class (but it breaks later the UI on the Owner update screen)
How to Reproduce?
Clone and build the quarkus-spring-petclinic project:
Sure @geoand I've gave them in the How to Reproduce? section. You need to clone the https://github.com/spring-petclinic/quarkus-spring-petclinic.git repository and then run the gradle build. It should fail.
You can compare the Maven build that succeeds.
This happens in the Gradle version and not the Maven version because of the presense of implementation 'io.quarkus:quarkus-spring-data-rest in the former and not the latter.
Describe the bug
I've been working for a few months on a Spring Petclinic fork based on Quakus. It uses almost all the Spring extensions provided by Quarkus : Spring DI, Spring Web, Spring Data JPA, Spring Cache and Spring Boot
I've noticed a difference in behaviour between the Gradle and Maven builds of my
quarkus-spring-petclinic
application.The Maven build succeeds. The Gradle build fails. I don't know why?
Both build configurations should be using the same Quarlus artifact versions.
Expected behavior
With the same Java base code, gradle and maven build should produces the same behaviour.
Actual behavior
Successful Maven build logs can be found here: https://github.com/spring-petclinic/quarkus-spring-petclinic/actions/runs/14236867795/job/39897740064
Below I explain how to reproduce the Gradle error. I have attached my local logs to this post:
gradle.log.zip
The stacktrace:
The error comes from the
EndpointIndexer
class:quarkus/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java
Line 688 in 46892f9
To temporary fix the Gradle build error, you could try to remove the 4
@FormParam
annotations from theOwner
class (but it breaks later the UI on the Owner update screen)How to Reproduce?
Clone and build the
quarkus-spring-petclinic
project:Output of
uname -a
orver
Darwin MacBook.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041 arm64
Output of
java -version
OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
Quarkus version or git rev
3.21.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.12
Additional information
I hope this problem is not due to an error in my use of Quarkus.
The text was updated successfully, but these errors were encountered: