Skip to content

Bug Report: @Context UriInfo works, but @Inject UriInfo fails / FISH-10792 #7255

Open
@mkarg

Description

@mkarg

Brief Summary

AFAIK there should be no difference between @Context UriInfo and @Inject UriInfo in Payara 6, but actually using @Context works well, while @Inject fails.

Expected Outcome

There should not be a deployment failure.

Current Outcome

remote failure: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type UriInfo with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject de.quipsy.inspections.server.core.InspectionResource.injectUriInfo
  at de.quipsy.inspections.server.core.InspectionResource.injectUriInfo(InspectionResource.java:0)
iInfo()]
 -- WELD-001408: Unsatisfied dependencies for type UriInfo with qualifiers @Default
  at de.quipsy.inspections.server.core.InspectionResource.injectUriInfo(InspectionResource.java:0)
WELD-001475: The following beans match by type, but none have matching qualifiers:
  - Producer Method [UriInfo] with qualifiers [@JaxRsContext @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsContext @RequestScoped public org.eclipse.krazo.jaxrs.JaxRsContextProducer.produceUriInfo()]
. Please see server.log for more details.
Command deploy failed.

Side Note: It is pretty strange to see krazo mentioned in the error message, as the deployed application is not using Jakarta MVC at all; it is a 100% pure JAX-RS application with just one single, empty test endpoint.

Reproducer

inject-context-reproducer.zip

mvn clean package
asadmin deploy --upload .\quipsy-ng\quipsy-ng-ear\target\quipsy-ng-ear.ear

Operating System

Windows 10 Pro

JDK Version

Zulu JDK 23.0.1

Payara Distribution

Payara Server Full Profile

Metadata

Metadata

Labels

Status: AcceptedConfirmed defect or accepted improvement to implement, issue has been escalated to Platform DevType: BugLabel issue as a bug defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions