Yeah, this should probably work. Please log a jira case.
Peter wrote:
> I have this code:
>
> public static class NotFoundExceptionMapper implements javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.NotFoundException> {
> public @Context Request req;
> @Override
> public Response toResponse(org.jboss.resteasy.spi.NotFoundException ex) {
> Variant v = req.selectVariant(vl);
>
>
> And when i access a non-existant url (which triggers an exception that matches this exception mapper) it generates:
>
> org.jboss.resteasy.spi.LoggableFailure: Unable to inject contextual data of type: javax.ws.rs.core.Request
> at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:53)
> at $Proxy231.selectVariant(Unknown Source)
>
> Should I expect this to work? (i.e. is this a bug) Or should I be doing things differently.
>
> Regards, Peter
- relates to
-
RESTEASY-396 Unable to inject contextual data of type: javax.ws.rs.core.HttpHeaders
- Closed