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

REST Data Panache cannot be used with RESTEasy Reactive #20688

Closed
YVbakker opened this issue Oct 12, 2021 · 4 comments · Fixed by #20874
Closed

REST Data Panache cannot be used with RESTEasy Reactive #20688

YVbakker opened this issue Oct 12, 2021 · 4 comments · Fixed by #20874
Assignees
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@YVbakker
Copy link

YVbakker commented Oct 12, 2021

Describe the bug

when following experimental guide GENERATING JAX-RS RESOURCES WITH PANACHE, after adding the dependencies listed in an empty quarkus project, quarkus fails to start due to

java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)

5 months ago, a similar question was asked on stackoverflow, however this is seemingly not the case here as there are no duplicate dependencies in pom.xml.

I believe this is an internal conflict in the quarkus-resteasy-reactive-jackson extension at version 2.3.0.Final.

As the guide I'm following is experimental, and it asks me to create issues for things I find, here you go.

Expected behavior

Quarkus dev server starts as per usual

Actual behavior

Quarkus fails to start with message:

ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:418)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:276)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:67)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:92)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:441)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:65)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:137)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: java.lang.IllegalArgumentException: Multiple matching properties for name "security.jaxrs.deny-unannotated-endpoints" property was matched by both public boolean io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig.denyJaxRs and public boolean io.quarkus.resteasy.runtime.JaxRsSecurityConfig.denyJaxRs. This is likely because you have an incompatible combination of extensions that both define the same properties (e.g. including both reactive and blocking database extensions)
        at io.quarkus.deployment.configuration.matching.PatternMapBuilder.addMember(PatternMapBuilder.java:68)
        at io.quarkus.deployment.configuration.matching.PatternMapBuilder.addGroup(PatternMapBuilder.java:57)
        at io.quarkus.deployment.configuration.matching.PatternMapBuilder.makePatterns(PatternMapBuilder.java:32)
        at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.<init>(BuildTimeConfigurationReader.java:126)
        at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:142)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:107)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:416)
        ... 9 more

How to Reproduce?

  1. Create empty Quarkus project.
  2. Following guide https://quarkus.io/guides/rest-data-panache, add the dependencies:
<dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-hibernate-orm-rest-data-panache</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>

Output of uname -a or ver

Darwin 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64

Output of java -version

openjdk version "17" 2021-09-14 LTS OpenJDK Runtime Environment Zulu17.28+13-CA (build 17+35-LTS) OpenJDK 64-Bit Server VM Zulu17.28+13-CA (build 17+35-LTS, mixed mode, sharing)

GraalVM version (if different from Java)

n/a

Quarkus version or git rev

2.3.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: /Users/yvbakker/.m2/wrapper/dists/apache-maven-3.8.1-bin/2l5mhf2pq2clrde7f7qp1rdt5m/apache-maven-3.8.1 Java version: 17, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home Default locale: en_NL, platform encoding: UTF-8 OS name: "mac os x", version: "11.6", arch: "aarch64", family: "mac"

Additional information

No response

@YVbakker YVbakker added the kind/bug Something isn't working label Oct 12, 2021
@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

Currently quarkus-hibernate-orm-rest-data-panache can't be used with quarkus-resteasy-reactive* as the former depends on quarkus-resteasy*.

This will hopefully be fixed for 2.5

@geoand geoand self-assigned this Oct 12, 2021
@geoand geoand changed the title Failed to start quarkus: RuntimeException REST Data Panache cannot be used with RESTEasy Reactive Oct 12, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 12, 2021

/cc @FroMage, @stuartwdouglas

@YVbakker
Copy link
Author

YVbakker commented Oct 12, 2021

Currently quarkus-hibernate-orm-rest-data-panache can't be used with quarkus-resteasy-reactive* as the former depends on quarkus-resteasy*.

This will hopefully be fixed for 2.5

Thanks for the clarification, would you like me to make a PR so this is reflected in the guide?

@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

Sure, that would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants