question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus 1.12.1.Final doesnt honor the path declared in the javax.ws.rs.core.Application

See original GitHub issue

Describe the bug I chose to implement a javax.ws.rs.core.Application because of some OpenAPI values I would like define there (info, security and so on). I defined the base path of my application inside the javax.ws.rs.core.Application class, with the Path() annotation.
Quarkus ignores the declared path. The resources still work with their declared path without the prefix path declared inside the javax.ws.rs.core.Application class.

Following an example:

  • javax.ws.rs.core.Application class with Path(“/application”)
  • resource with Path(“/resource”)

I can successfully call the rest resource with the path /resource, but it doesnt work with the path /application/resource.

Expected behavior I should be able to successfully call the /application/resource endpoint.

Actual behavior I can successfully call the rest resource with the path /resource, but it doesnt work with the path /application/resource.

To Reproduce

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
https://github.com/dbl81/applicationpath.git

Steps to reproduce the behavior:

  1. clone the repo
  2. mvn compile quarkus:dev
  3. browse: http://localhost:8080/application/resource --> 404
  4. browse: http://localhost:8080/resource --> 200 (plain text response “hello”)

Configuration

Screenshots

Environment (please complete the following information):

  • Output of uname -a or ver: Windows 10 Home Edition
  • Output of java -version:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
  • Quarkus version or git rev: 1.12.1.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): mvn
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\apache-maven-3.6.3
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: C:\Program Files\jdk-11.0.7.10-hotspot
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dbl81commented, Mar 4, 2021

OMG, shame on me! I’m really sorry for bothering! I followed your hint and it worked like a charm.

Hoping next time I can help you in improving the cool Quarkus. I close this issue.

1reaction
dbl81commented, Mar 4, 2021

I was using resteasy (not the reactive implementation), I’m sorry I didnt mention it before! I ran my previous test on resteasy (not reactive) and the example I published (branch called main) has resteasy as dependency.

Following your (inverse) input I switched to resteasy-reactive and I faced the same problems. I pushed the new code to the branch called reactive.

Read more comments on GitHub >

github_iconTop Results From Across the Web

chore(deps): update dependency io.quarkus:quarkus ... - GitLab
An error occurred while retrieving approval data for this merge request. chore(deps): update dependency io.quarkus:quarkus ...
Read more >
Where are UI files for Qt Designer? - Ryven - GitAnswer
The dev branch already doesn't contain the core anymore, since, as I announced in #50, ... Final doesnt honor the path declared in...
Read more >
Quarkus changelog - Awesome Java - LibHunt
Complete changelog ; #13202 - Allow releasing runner class loader resources; #13201 - Bump flyway-core from 7.1.1 to 7.2.0 ; #13199 - Bump...
Read more >
Search Results - CVE
A path traversal vulnerability was discovered in Pilz PASvisu Server before 1.12.0. An unauthenticated remote attacker could use a zipped, malicious ...
Read more >
NOTICE.pdf - Index of / - NetApp
This offer is valid for three years from the date you acquired the SnapCenter products or for as long asthe applicable license requires...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found