Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-300

Unable to inject contextual data of type: javax.ws.rs.core.Request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 1.2.RC1
    • 1.1.RC2
    • jaxrs
    • None

      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

              patriot1burke@gmail.com Bill Burke (Inactive)
              pbkwee_jira Peter Bryant (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: